mperham/girl_friday

Race condition in test_should_allow_graceful_shutdown

Closed this issue · 0 comments

In TestGirlFridayQueue#test_should_allow_graceful_shutdown, I consistently get the following when running with --seed=1415:

  1) Failure:
test_should_allow_graceful_shutdown(TestGirlFridayQueue) [/Users/woody/girl_friday/test/test_girl_friday_queue.rb:185]:
Expected: 1
  Actual: 4

However, if I add sleep 0.1 to line 184 of the test (right before assert_equal 1, GirlFriday.queues.size), I get consistently passing tests.

If I'm the only one that can repro it, I'm the only one that can fix it, but do you have any ideas of where to start? I'm willing to look in to it, but don't have time for a huge investment.

MacBookPro8,1 (13'' Intel Core i7, 2.7ghz) running ruby 1.9.3-p0.