AMQP-365 Fix Test Race Condition - backport

JIRA: https://jira.springsource.org/browse/AMQP-365

See the JIRA issue for a description of the race condition.