开发者

Testing concurrent access on Rails 3 application

This question is a follow up from this other question: Rails 3, locking tables on an auction type engine

I've implemented the solution using Pessimistic Locking directly on Rails 3. Now I want to write some tests that exercise my code. I have no idea how to test concurrency problems on Rails. Any hint or gem?

The particular piece of 开发者_StackOverflow中文版code is very very critical and I want to be sure it is well tested.


I had the exact same problem and have implemented a simple gem for synchronizing subprocesses using breakpoints: http://github.com/remen/fork_break

I've also documented an advanced usage scenario for rails3 at http://www.hairoftheyak.com/testing-concurrency-in-rails/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜