spring-projects/spring-amqp — pull request #141 by garyrussell (2014-01-04 15:28:01+00:00)
Title: AMQP-355 Fix Race Condition in Tests

JIRA: https://jira.springsource.org/browse/AMQP-355

The container might stop before the final call to ErrorHandler.

Change the mock to count down a latch, and wait for the latch
before stopping the container - instead of simply verifying
handleError was called the expected number of times.

Move the other Assert inside the try block so the shutdown
will always happen.

Remove the unnecessary mock.reset().