public void testCreateQueueAMQQueue() throws Exception { AMQQueue queue = createTestQueue(getName(), getName() + "Owner", true); _store.createQueue(queue); reopenStore(); verify(_queueRecoveryHandler).queue(_queueId, getName(), getName() + "Owner", true, null, null); }
public void testCreateQueueAMQQueueWithAlternateExchange() throws Exception { Exchange alternateExchange = createTestAlternateExchange(); AMQQueue queue = createTestQueue(getName(), getName() + "Owner", true, alternateExchange); _store.createQueue(queue); reopenStore(); verify(_queueRecoveryHandler) .queue(_queueId, getName(), getName() + "Owner", true, null, alternateExchange.getId()); }
public void testCreateQueueAMQQueueFieldTable() throws Exception { AMQQueue queue = createTestQueue(getName(), getName() + "Owner", true); Map<String, Object> attributes = new HashMap<String, Object>(); attributes.put("x-qpid-dlq-enabled", Boolean.TRUE); attributes.put("x-qpid-maximum-delivery-count", new Integer(10)); FieldTable arguments = FieldTable.convertToFieldTable(attributes); _store.createQueue(queue, arguments); reopenStore(); verify(_queueRecoveryHandler) .queue(_queueId, getName(), getName() + "Owner", true, arguments, null); }
public void testUpdateQueueAlternateExchange() throws Exception { // create queue AMQQueue queue = createTestQueue(getName(), getName() + "Owner", true); Map<String, Object> attributes = new HashMap<String, Object>(); attributes.put("x-qpid-dlq-enabled", Boolean.TRUE); attributes.put("x-qpid-maximum-delivery-count", new Integer(10)); FieldTable arguments = FieldTable.convertToFieldTable(attributes); _store.createQueue(queue, arguments); // update the queue to have exclusive=false Exchange alternateExchange = createTestAlternateExchange(); queue = createTestQueue(getName(), getName() + "Owner", false, alternateExchange); _store.updateQueue(queue); reopenStore(); verify(_queueRecoveryHandler) .queue( _queueId, getName(), getName() + "Owner", false, arguments, alternateExchange.getId()); }
public void testRemoveQueue() throws Exception { // create queue AMQQueue queue = createTestQueue(getName(), getName() + "Owner", true); Map<String, Object> attributes = new HashMap<String, Object>(); attributes.put("x-qpid-dlq-enabled", Boolean.TRUE); attributes.put("x-qpid-maximum-delivery-count", new Integer(10)); FieldTable arguments = FieldTable.convertToFieldTable(attributes); _store.createQueue(queue, arguments); // remove queue _store.removeQueue(queue); reopenStore(); verify(_queueRecoveryHandler, never()) .queue( any(UUID.class), anyString(), anyString(), anyBoolean(), any(FieldTable.class), any(UUID.class)); }