You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2014/10/21 15:32:34 UTC

svn commit: r1633375 - /qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java

Author: rgodfrey
Date: Tue Oct 21 13:32:33 2014
New Revision: 1633375

URL: http://svn.apache.org/r1633375
Log:
QPID-6172 : Fix test to account for the fact that TYPE is always present

Modified:
    qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java

Modified: qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java?rev=1633375&r1=1633374&r2=1633375&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java (original)
+++ qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java Tue Oct 21 13:32:33 2014
@@ -72,6 +72,7 @@ public abstract class AbstractDurableCon
 
     private static final UUID ANY_UUID = UUID.randomUUID();
     private static final Map ANY_MAP = new HashMap();
+    public static final String STANDARD = "standard";
 
 
     private String _storePath;
@@ -203,6 +204,7 @@ public abstract class AbstractDurableCon
         map.put(Binding.NAME, ROUTING_KEY);
         map.put(Binding.ARGUMENTS,_bindingArgs);
         map.put(Binding.DURABLE,true);
+        map.put(Binding.TYPE, Binding.class.getSimpleName());
 
         Map<String,UUID> parents = new HashMap<String, UUID>();
 
@@ -308,6 +310,7 @@ public abstract class AbstractDurableCon
         queueAttributes.put(Queue.NAME, getName());
         queueAttributes.put(Queue.OWNER, getName()+"Owner");
         queueAttributes.put(Queue.EXCLUSIVE, ExclusivityPolicy.CONTAINER.name());
+        queueAttributes.put(Queue.TYPE, STANDARD);
         verify(_handler).handle(matchesRecord(_queueId, QUEUE, queueAttributes));
     }
 
@@ -316,6 +319,7 @@ public abstract class AbstractDurableCon
         Map<String, Object> attributes = new HashMap<String, Object>();
         attributes.put(AbstractVirtualHost.CREATE_DLQ_ON_CREATION, Boolean.TRUE);
         attributes.put(Queue.MAXIMUM_DELIVERY_ATTEMPTS, 10);
+        attributes.put(Queue.TYPE, STANDARD);
         AMQQueue queue = createTestQueue(getName(), getName() + "Owner", true, attributes);
 
         _configStore.create(queue.asObjectRecord());
@@ -348,7 +352,7 @@ public abstract class AbstractDurableCon
         queueAttributes.put(Queue.OWNER, getName()+"Owner");
         queueAttributes.put(Queue.EXCLUSIVE, ExclusivityPolicy.CONTAINER.name());
         queueAttributes.put(Queue.ALTERNATE_EXCHANGE, alternateExchange.getId().toString());
-
+        queueAttributes.put(Queue.TYPE, STANDARD);
         verify(_handler).handle(matchesRecord(_queueId, QUEUE, queueAttributes));
     }
 
@@ -366,6 +370,7 @@ public abstract class AbstractDurableCon
         Map<String, Object> attributes = new HashMap<String, Object>();
         attributes.put(AbstractVirtualHost.CREATE_DLQ_ON_CREATION, Boolean.TRUE);
         attributes.put(Queue.MAXIMUM_DELIVERY_ATTEMPTS, 10);
+        attributes.put(Queue.TYPE, STANDARD);
         AMQQueue queue = createTestQueue(getName(), getName() + "Owner", true, attributes);
 
         _configStore.create(queue.asObjectRecord());
@@ -410,7 +415,7 @@ public abstract class AbstractDurableCon
         queueAttributes.put(Queue.NAME, getName());
         queueAttributes.putAll(attributes);
         queueAttributes.put(Queue.ALTERNATE_EXCHANGE, alternateExchange.getId().toString());
-
+        queueAttributes.put(Queue.TYPE, STANDARD);
         verify(_handler).handle(matchesRecord(_queueId, QUEUE, queueAttributes));
     }
 
@@ -447,6 +452,7 @@ public abstract class AbstractDurableCon
         when(queue.getName()).thenReturn(queueName);
         when(queue.isExclusive()).thenReturn(exclusive);
         when(queue.getId()).thenReturn(_queueId);
+        when(queue.getType()).thenReturn(STANDARD);
         when(queue.getAlternateExchange()).thenReturn(alternateExchange);
         when(queue.getCategoryClass()).thenReturn((Class)Queue.class);
         when(queue.isDurable()).thenReturn(true);
@@ -457,6 +463,7 @@ public abstract class AbstractDurableCon
         when(queue.getVirtualHost()).thenReturn(vh);
         final Map<String,Object> attributes = arguments == null ? new LinkedHashMap<String, Object>() : new LinkedHashMap<String, Object>(arguments);
         attributes.put(Queue.NAME, queueName);
+        attributes.put(Queue.TYPE, STANDARD);
         if(alternateExchange != null)
         {
             attributes.put(Queue.ALTERNATE_EXCHANGE, alternateExchange);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org