beanstalkd/beaneater — pull request #37 by tdg5 (2013-10-14 13:11:49+00:00)
Title: Reduce sleep in thread safe tests by 87.5%

This change reduces the sleeps in test/beaneater_test.rb by 87.5%. This makes the full test suite about 7-8x faster.

I'm not sure if there is a reason the sleeps are set the way they are (possibly there's an issue with race conditions and the longer sleeps are needed to ensure consistency?), but I ran the thread safe tests about 50 times with the reduced sleep cycles and encountered no failures.

It may even be possible to reduce the sleeps further, but getting the test suite under 5 seconds (at least on my machine) is sufficient for me.