Testing concurrent access to a Rails 3 application

This question is a continuation of this other question: Rails 3, locking tables on an auction-type engine

I implemented the solution using Pessimistic Locking directly on Rails 3. Now I want to write some tests that run my code. I do not know how to test concurrency problems on Rails. Any hint or gem?

The particular piece of code is very critical, and I want to make sure that it is well tested.

+4
source share
1 answer

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

I also documented an extended use case for rails3 at http://www.hairoftheyak.com/testing-concurrency-in-rails/

+2
source

All Articles