puppetlabs/puppetdb — pull request #392 by kbarber (2013-01-03 23:33:58+00:00)
Title: Work-around race in AMQ scheduler test giving more room for rounding

It appears to me that the ActiveMQ scheduler implementation will round delays
off to the second-tick. For this reason its possible that results may differ
+/- 1 second dependending on their exact start time in milliseconds from the
second. This change gives more room for this 'jitter'.

Also, upon failures the bounded-drain-into-vec! was blocking forever, as all
messages had already been flushed. This replaces that call with the
timed-drain-into-vec! call which times out. This should remove the main
annoyance of this bug, which is that the tests fail and then block forever
in Jenkins.

Signed-off-by: Ken Barber