{
Collection<Consumer> consumers = ((QueueBinding)binding).getQueue().getConsumers();
for (Consumer consumer : consumers)
{
ServerConsumerImpl consumerImpl = (ServerConsumerImpl)consumer;
long timeout = System.currentTimeMillis() + 5000;
while (timeout > System.currentTimeMillis() && consumerImpl.getAvailableCredits() != null)
{
Thread.sleep(10);
}
Assert.assertNull(consumerImpl.getAvailableCredits());
}
}
}
ClientProducer prod = sessionA.createProducer(ADDRESS);