ARTEMIS-945 - fix test and queue delete

https://issues.apache.org/jira/browse/ARTEMIS-945
This commit is contained in:
Andy Taylor 2017-02-07 09:27:58 +00:00
parent 0df002597f
commit d937e8a8e1
2 changed files with 8 additions and 1 deletions

View File

@ -34,6 +34,13 @@ public class QueueManagerImpl implements QueueManager {
@Override
public void run() {
Queue queue = server.locateQueue(queueName);
//the queue may already have been deleted and this is a result of that
if (queue == null) {
if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) {
ActiveMQServerLogger.LOGGER.debug("pno queue to delete \"" + queueName + ".\"");
}
return;
}
SimpleString address = queue.getAddress();
AddressSettings settings = server.getAddressSettingsRepository().getMatch(address.toString());
long consumerCount = queue.getConsumerCount();

View File

@ -830,7 +830,7 @@ public class ProtonTest extends ProtonTestBase {
Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisfied() throws Exception {
return amqpConnection.isClosed();
return receiver.isClosed();
}
});
assertTrue(receiver.isClosed());