You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2018/01/05 01:00:13 UTC
[1/2] qpid-broker-j git commit: QPID-6933: [System Tests] Refactor
AMQP 1-0 JMS routing tests as JMS 1.1 system test
Repository: qpid-broker-j
Updated Branches:
refs/heads/master 4542234d5 -> a2e57db7c
QPID-6933: [System Tests] Refactor AMQP 1-0 JMS routing tests as JMS 1.1 system test
Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/61389ed5
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/61389ed5
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/61389ed5
Branch: refs/heads/master
Commit: 61389ed54cf1dca3548d4ad2c9450b6232db248a
Parents: 4542234
Author: Alex Rudyy <or...@apache.org>
Authored: Fri Jan 5 00:13:49 2018 +0000
Committer: Alex Rudyy <or...@apache.org>
Committed: Fri Jan 5 00:13:49 2018 +0000
----------------------------------------------------------------------
.../extensions/routing/MessageRoutingTest.java | 299 +++++++++++++++++++
.../apache/qpid/systest/MessageRoutingTest.java | 186 ------------
test-profiles/CPPExcludes | 2 -
test-profiles/Java010Excludes | 2 -
test-profiles/JavaPre010Excludes | 3 -
5 files changed, 299 insertions(+), 193 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/61389ed5/systests/qpid-systests-jms_1.1/src/test/java/org/apache/qpid/systests/jms_1_1/extensions/routing/MessageRoutingTest.java
----------------------------------------------------------------------
diff --git a/systests/qpid-systests-jms_1.1/src/test/java/org/apache/qpid/systests/jms_1_1/extensions/routing/MessageRoutingTest.java b/systests/qpid-systests-jms_1.1/src/test/java/org/apache/qpid/systests/jms_1_1/extensions/routing/MessageRoutingTest.java
new file mode 100644
index 0000000..db6b61e
--- /dev/null
+++ b/systests/qpid-systests-jms_1.1/src/test/java/org/apache/qpid/systests/jms_1_1/extensions/routing/MessageRoutingTest.java
@@ -0,0 +1,299 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.systests.jms_1_1.extensions.routing;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assume.assumeThat;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
+import org.junit.Test;
+
+import org.apache.qpid.server.model.Exchange;
+import org.apache.qpid.server.model.Protocol;
+import org.apache.qpid.systests.JmsTestBase;
+
+public class MessageRoutingTest extends JmsTestBase
+{
+ private static final String EXCHANGE_NAME = "testExchange";
+ private static final String QUEUE_NAME = "testQueue";
+ private static final String ROUTING_KEY = "testRoute";
+
+ @Test
+ public void testRoutingWithSubjectSetAsJMSMessageType() throws Exception
+ {
+ assumeThat("AMQP 1.0 test", getProtocol(), is(equalTo(Protocol.AMQP_1_0)));
+
+ prepare();
+
+ Connection connection = getConnection();
+ try
+ {
+ connection.start();
+ Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ Destination sendingDestination = session.createTopic(EXCHANGE_NAME);
+ Destination receivingDestination = session.createQueue(QUEUE_NAME);
+
+ Message message = session.createTextMessage("test");
+ message.setJMSType(ROUTING_KEY);
+
+ MessageProducer messageProducer = session.createProducer(sendingDestination);
+ messageProducer.send(message);
+
+ MessageConsumer messageConsumer = session.createConsumer(receivingDestination);
+ Message receivedMessage = messageConsumer.receive(getReceiveTimeout());
+
+ assertNotNull("Message not received", receivedMessage);
+ assertEquals("test", ((TextMessage) message).getText());
+ }
+ finally
+ {
+ connection.close();
+ }
+ }
+
+
+
+ @Test
+ public void testAnonymousRelayRoutingWithSubjectSetAsJMSMessageType() throws Exception
+ {
+ assumeThat("AMQP 1.0 test", getProtocol(), is(equalTo(Protocol.AMQP_1_0)));
+
+ prepare();
+
+ Connection connection = getConnection();
+ try
+ {
+ connection.start();
+ Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ Destination sendingDestination = session.createTopic(EXCHANGE_NAME);
+ Destination receivingDestination = session.createQueue(QUEUE_NAME);
+
+ Message message = session.createTextMessage("test");
+ message.setJMSType(ROUTING_KEY);
+
+ MessageProducer messageProducer = session.createProducer(null);
+ messageProducer.send(sendingDestination, message);
+
+ MessageConsumer messageConsumer = session.createConsumer(receivingDestination);
+ Message receivedMessage = messageConsumer.receive(getReceiveTimeout());
+
+ assertNotNull("Message not received", receivedMessage);
+ assertEquals("test", ((TextMessage) message).getText());
+ }
+ finally
+ {
+ connection.close();
+ }
+ }
+
+ @Test
+ public void testRoutingWithRoutingKeySetAsJMSProperty() throws Exception
+ {
+ assumeThat("AMQP 1.0 test", getProtocol(), is(equalTo(Protocol.AMQP_1_0)));
+
+ prepare();
+
+ Connection connection = getConnection();
+ try
+ {
+ connection.start();
+ Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ Destination sendingDestination = session.createTopic(EXCHANGE_NAME);
+ Destination receivingDestination = session.createQueue(QUEUE_NAME);
+
+ Message message = session.createTextMessage("test");
+ message.setStringProperty("routing_key", ROUTING_KEY);
+
+ MessageProducer messageProducer = session.createProducer(sendingDestination);
+ messageProducer.send(message);
+
+ MessageConsumer messageConsumer = session.createConsumer(receivingDestination);
+ Message receivedMessage = messageConsumer.receive(getReceiveTimeout());
+
+ assertNotNull("Message not received", receivedMessage);
+ assertEquals("test", ((TextMessage) message).getText());
+ }
+ finally
+ {
+ connection.close();
+ }
+ }
+
+ @Test
+ public void testRoutingWithExchangeAndRoutingKeyDestination() throws Exception
+ {
+ assumeThat("AMQP 1.0 test", getProtocol(), is(equalTo(Protocol.AMQP_1_0)));
+
+ prepare();
+
+ Connection connection = getConnection();
+ try
+ {
+ connection.start();
+ Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ Destination sendingDestination = session.createTopic(EXCHANGE_NAME + "/" + ROUTING_KEY);
+ Destination receivingDestination = session.createQueue(QUEUE_NAME);
+
+ Message message = session.createTextMessage("test");
+
+ MessageProducer messageProducer = session.createProducer(sendingDestination);
+ messageProducer.send(message);
+
+ MessageConsumer messageConsumer = session.createConsumer(receivingDestination);
+ Message receivedMessage = messageConsumer.receive(getReceiveTimeout());
+
+ assertNotNull("Message not received", receivedMessage);
+ assertEquals("test", ((TextMessage) message).getText());
+ }
+ finally
+ {
+ connection.close();
+ }
+ }
+
+ @Test
+ public void testAnonymousRelayRoutingWithExchangeAndRoutingKeyDestination() throws Exception
+ {
+ assumeThat("AMQP 1.0 test", getProtocol(), is(equalTo(Protocol.AMQP_1_0)));
+
+ prepare();
+
+ Connection connection = getConnection();
+ try
+ {
+ connection.start();
+ Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ Destination sendingDestination = session.createTopic(EXCHANGE_NAME + "/" + ROUTING_KEY);
+ Destination receivingDestination = session.createQueue(QUEUE_NAME);
+
+ Message message = session.createTextMessage("test");
+
+ MessageProducer messageProducer = session.createProducer(null);
+ messageProducer.send(sendingDestination, message);
+
+ MessageConsumer messageConsumer = session.createConsumer(receivingDestination);
+ Message receivedMessage = messageConsumer.receive(getReceiveTimeout());
+
+ assertNotNull("Message not received", receivedMessage);
+ assertEquals("test", ((TextMessage) message).getText());
+ }
+ finally
+ {
+ connection.close();
+ }
+ }
+
+ @Test
+ public void testRoutingToQueue() throws Exception
+ {
+ assumeThat("AMQP 1.0 test", getProtocol(), is(equalTo(Protocol.AMQP_1_0)));
+
+ prepare();
+
+ Connection connection = getConnection();
+ try
+ {
+ connection.start();
+ Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ Destination sendingDestination = session.createQueue(QUEUE_NAME);
+ Destination receivingDestination = session.createQueue(QUEUE_NAME);
+
+ Message message = session.createTextMessage("test");
+
+ MessageProducer messageProducer = session.createProducer(sendingDestination);
+ messageProducer.send(message);
+
+ MessageConsumer messageConsumer = session.createConsumer(receivingDestination);
+ Message receivedMessage = messageConsumer.receive(getReceiveTimeout());
+
+ assertNotNull("Message not received", receivedMessage);
+ assertEquals("test", ((TextMessage) message).getText());
+ }
+ finally
+ {
+ connection.close();
+ }
+ }
+
+ @Test
+ public void testAnonymousRelayRoutingToQueue() throws Exception
+ {
+ assumeThat("AMQP 1.0 test", getProtocol(), is(equalTo(Protocol.AMQP_1_0)));
+
+ prepare();
+
+ Connection connection = getConnection();
+ try
+ {
+ connection.start();
+ Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ Destination sendingDestination = session.createQueue(QUEUE_NAME);
+ Destination receivingDestination = session.createQueue(QUEUE_NAME);
+
+ Message message = session.createTextMessage("test");
+
+ MessageProducer messageProducer = session.createProducer(null);
+ messageProducer.send(sendingDestination, message);
+
+ MessageConsumer messageConsumer = session.createConsumer(receivingDestination);
+ Message receivedMessage = messageConsumer.receive(getReceiveTimeout());
+
+ assertNotNull("Message not received", receivedMessage);
+ assertEquals("test", ((TextMessage) message).getText());
+ }
+ finally
+ {
+ connection.close();
+ }
+ }
+
+ private void prepare() throws Exception
+ {
+ createEntityUsingAmqpManagement(EXCHANGE_NAME, "org.apache.qpid.DirectExchange",
+ Collections.singletonMap(Exchange.UNROUTABLE_MESSAGE_BEHAVIOUR, "REJECT"));
+ createEntityUsingAmqpManagement(QUEUE_NAME, "org.apache.qpid.Queue", Collections.emptyMap());
+
+ final Map<String, Object> arguments = new HashMap<>();
+ arguments.put("destination", QUEUE_NAME);
+ arguments.put("bindingKey", ROUTING_KEY);
+ performOperationUsingAmqpManagement(EXCHANGE_NAME, "bind", "org.apache.qpid.Exchange", arguments);
+ }
+}
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/61389ed5/systests/src/test/java/org/apache/qpid/systest/MessageRoutingTest.java
----------------------------------------------------------------------
diff --git a/systests/src/test/java/org/apache/qpid/systest/MessageRoutingTest.java b/systests/src/test/java/org/apache/qpid/systest/MessageRoutingTest.java
deleted file mode 100644
index f2f6b4a..0000000
--- a/systests/src/test/java/org/apache/qpid/systest/MessageRoutingTest.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.systest;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.qpid.server.model.Exchange;
-import org.apache.qpid.test.utils.QpidBrokerTestCase;
-
-public class MessageRoutingTest extends QpidBrokerTestCase
-{
- private static final String EXCHANGE_NAME = "testExchange";
- private static final String QUEUE_NAME = "testQueue";
- private static final String ROUTING_KEY = "testRoute";
- private Connection _connection;
- private Session _session;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- _connection = getConnectionBuilder().build();
- _connection.start();
- _session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- createEntityUsingAmqpManagement(EXCHANGE_NAME, _session, "org.apache.qpid.DirectExchange",
- Collections.singletonMap(Exchange.UNROUTABLE_MESSAGE_BEHAVIOUR, "REJECT"));
- createEntityUsingAmqpManagement(QUEUE_NAME, _session, "org.apache.qpid.Queue");
-
- final Map<String, Object> arguments = new HashMap<>();
- arguments.put("destination", QUEUE_NAME);
- arguments.put("bindingKey", ROUTING_KEY);
- performOperationUsingAmqpManagement(EXCHANGE_NAME, "bind", _connection.createSession(false, Session.AUTO_ACKNOWLEDGE), "org.apache.qpid.Exchange",
- arguments);
- }
-
- public void testRoutingWithSubjectSetAsJMSMessageType() throws Exception
- {
- Destination sendingDestination = _session.createTopic(EXCHANGE_NAME);
- Destination receivingDestination = _session.createQueue(QUEUE_NAME);
-
- Message message = _session.createTextMessage("test");
- message.setJMSType(ROUTING_KEY);
-
- MessageProducer messageProducer = _session.createProducer(sendingDestination);
- messageProducer.send(message);
-
- MessageConsumer messageConsumer = _session.createConsumer(receivingDestination);
- Message receivedMessage = messageConsumer.receive(getReceiveTimeout());
-
- assertNotNull("Message not received", receivedMessage);
- assertEquals("test", ((TextMessage)message).getText());
- }
-
- public void testAnonymousRelayRoutingWithSubjectSetAsJMSMessageType() throws Exception
- {
- Destination sendingDestination = _session.createTopic(EXCHANGE_NAME);
- Destination receivingDestination = _session.createQueue(QUEUE_NAME);
-
- Message message = _session.createTextMessage("test");
- message.setJMSType(ROUTING_KEY);
-
- MessageProducer messageProducer = _session.createProducer(null);
- messageProducer.send(sendingDestination, message);
-
- MessageConsumer messageConsumer = _session.createConsumer(receivingDestination);
- Message receivedMessage = messageConsumer.receive(getReceiveTimeout());
-
- assertNotNull("Message not received", receivedMessage);
- assertEquals("test", ((TextMessage)message).getText());
- }
-
- public void testRoutingWithRoutingKeySetAsJMSProperty() throws Exception
- {
- Destination sendingDestination = _session.createTopic(EXCHANGE_NAME);
- Destination receivingDestination = _session.createQueue(QUEUE_NAME);
-
- Message message = _session.createTextMessage("test");
- message.setStringProperty("routing_key", ROUTING_KEY);
-
- MessageProducer messageProducer = _session.createProducer(sendingDestination);
- messageProducer.send(message);
-
- MessageConsumer messageConsumer = _session.createConsumer(receivingDestination);
- Message receivedMessage = messageConsumer.receive(getReceiveTimeout());
-
- assertNotNull("Message not received", receivedMessage);
- assertEquals("test", ((TextMessage)message).getText());
- }
-
- public void testRoutingWithExchangeAndRoutingKeyDestination() throws Exception
- {
- Destination sendingDestination = _session.createTopic(EXCHANGE_NAME + "/" + ROUTING_KEY);
- Destination receivingDestination = _session.createQueue(QUEUE_NAME);
-
- Message message = _session.createTextMessage("test");
-
- MessageProducer messageProducer = _session.createProducer(sendingDestination);
- messageProducer.send(message);
-
- MessageConsumer messageConsumer = _session.createConsumer(receivingDestination);
- Message receivedMessage = messageConsumer.receive(getReceiveTimeout());
-
- assertNotNull("Message not received", receivedMessage);
- assertEquals("test", ((TextMessage)message).getText());
- }
-
- public void testAnonymousRelayRoutingWithExchangeAndRoutingKeyDestination() throws Exception
- {
- Destination sendingDestination = _session.createTopic(EXCHANGE_NAME + "/" + ROUTING_KEY);
- Destination receivingDestination = _session.createQueue(QUEUE_NAME);
-
- Message message = _session.createTextMessage("test");
-
- MessageProducer messageProducer = _session.createProducer(null);
- messageProducer.send(sendingDestination, message);
-
- MessageConsumer messageConsumer = _session.createConsumer(receivingDestination);
- Message receivedMessage = messageConsumer.receive(getReceiveTimeout());
-
- assertNotNull("Message not received", receivedMessage);
- assertEquals("test", ((TextMessage)message).getText());
- }
-
- public void testRoutingToQueue() throws Exception
- {
- Destination sendingDestination = _session.createQueue(QUEUE_NAME);
- Destination receivingDestination = _session.createQueue(QUEUE_NAME);
-
- Message message = _session.createTextMessage("test");
-
- MessageProducer messageProducer = _session.createProducer(sendingDestination);
- messageProducer.send(message);
-
- MessageConsumer messageConsumer = _session.createConsumer(receivingDestination);
- Message receivedMessage = messageConsumer.receive(getReceiveTimeout());
-
- assertNotNull("Message not received", receivedMessage);
- assertEquals("test", ((TextMessage)message).getText());
- }
-
- public void testAnonymousRelayRoutingToQueue() throws Exception
- {
- Destination sendingDestination = _session.createQueue(QUEUE_NAME);
- Destination receivingDestination = _session.createQueue(QUEUE_NAME);
-
- Message message = _session.createTextMessage("test");
-
- MessageProducer messageProducer = _session.createProducer(null);
- messageProducer.send(sendingDestination, message);
-
- MessageConsumer messageConsumer = _session.createConsumer(receivingDestination);
- Message receivedMessage = messageConsumer.receive(getReceiveTimeout());
-
- assertNotNull("Message not received", receivedMessage);
- assertEquals("test", ((TextMessage)message).getText());
- }
-}
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/61389ed5/test-profiles/CPPExcludes
----------------------------------------------------------------------
diff --git a/test-profiles/CPPExcludes b/test-profiles/CPPExcludes
index 4d8fe5c..09e7152 100755
--- a/test-profiles/CPPExcludes
+++ b/test-profiles/CPPExcludes
@@ -175,7 +175,5 @@ org.apache.qpid.tests.protocol.v1_0.*
org.apache.qpid.server.queue.QueueDepthWithSelectorTest#test
org.apache.qpid.test.unit.message.UTF8Test#*
-# Tests AMQP 1.0 specific routing semantics
-org.apache.qpid.systest.MessageRoutingTest#*
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/61389ed5/test-profiles/Java010Excludes
----------------------------------------------------------------------
diff --git a/test-profiles/Java010Excludes b/test-profiles/Java010Excludes
index db3316c..e95fbee 100755
--- a/test-profiles/Java010Excludes
+++ b/test-profiles/Java010Excludes
@@ -62,5 +62,3 @@ org.apache.qpid.systests.jms_2_0.*
// Exclude 1.0 protocol tests
org.apache.qpid.tests.protocol.v1_0.*
-// Tests AMQP 1.0 specific routing semantics
-org.apache.qpid.systest.MessageRoutingTest#*
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/61389ed5/test-profiles/JavaPre010Excludes
----------------------------------------------------------------------
diff --git a/test-profiles/JavaPre010Excludes b/test-profiles/JavaPre010Excludes
index 42f007d..f27acda 100644
--- a/test-profiles/JavaPre010Excludes
+++ b/test-profiles/JavaPre010Excludes
@@ -60,9 +60,6 @@ org.apache.qpid.systests.jms_2_0.*
// Exclude 1.0 protocol tests
org.apache.qpid.tests.protocol.v1_0.*
-// Tests AMQP 1.0 specific routing semantics
-org.apache.qpid.systest.MessageRoutingTest#*
-
// QPID-7948: A publish confirms defect prevents this test passing.
org.apache.qpid.server.security.acl.MessagingACLTest#testPublishToTempTopicSuccess
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[2/2] qpid-broker-j git commit: QPID-6933: [System Tests] Refactor
queue message durability tests as JMS 1.1 system test
Posted by or...@apache.org.
QPID-6933: [System Tests] Refactor queue message durability tests as JMS 1.1 system test
Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/a2e57db7
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/a2e57db7
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/a2e57db7
Branch: refs/heads/master
Commit: a2e57db7cc45ca4f0b8bb12c83f60ba2a6c6c25d
Parents: 61389ed
Author: Alex Rudyy <or...@apache.org>
Authored: Fri Jan 5 00:59:14 2018 +0000
Committer: Alex Rudyy <or...@apache.org>
Committed: Fri Jan 5 00:59:14 2018 +0000
----------------------------------------------------------------------
.../queue/QueueMessageDurabilityTest.java | 310 +++++++++++++++++++
.../queue/QueueMessageDurabilityTest.java | 221 -------------
test-profiles/CPPExcludes | 3 -
test-profiles/JavaTransientExcludes | 2 -
4 files changed, 310 insertions(+), 226 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/a2e57db7/systests/qpid-systests-jms_1.1/src/test/java/org/apache/qpid/systests/jms_1_1/extensions/queue/QueueMessageDurabilityTest.java
----------------------------------------------------------------------
diff --git a/systests/qpid-systests-jms_1.1/src/test/java/org/apache/qpid/systests/jms_1_1/extensions/queue/QueueMessageDurabilityTest.java b/systests/qpid-systests-jms_1.1/src/test/java/org/apache/qpid/systests/jms_1_1/extensions/queue/QueueMessageDurabilityTest.java
new file mode 100644
index 0000000..8d5d2d3
--- /dev/null
+++ b/systests/qpid-systests-jms_1.1/src/test/java/org/apache/qpid/systests/jms_1_1/extensions/queue/QueueMessageDurabilityTest.java
@@ -0,0 +1,310 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.systests.jms_1_1.extensions.queue;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeThat;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jms.Connection;
+import javax.jms.DeliveryMode;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
+import org.junit.Test;
+
+import org.apache.qpid.server.model.Protocol;
+import org.apache.qpid.server.store.MessageDurability;
+import org.apache.qpid.systests.AmqpManagementFacade;
+import org.apache.qpid.systests.JmsTestBase;
+
+public class QueueMessageDurabilityTest extends JmsTestBase
+{
+ private static final String DURABLE_ALWAYS_PERSIST_NAME = "DURABLE_QUEUE_ALWAYS_PERSIST";
+ private static final String DURABLE_NEVER_PERSIST_NAME = "DURABLE_QUEUE_NEVER_PERSIST";
+ private static final String DURABLE_DEFAULT_PERSIST_NAME = "DURABLE_QUEUE_DEFAULT_PERSIST";
+ private static final String NONDURABLE_ALWAYS_PERSIST_NAME = "NONDURABLE_QUEUE_ALWAYS_PERSIST";
+
+ @Test
+ public void testSendPersistentMessageToAll() throws Exception
+ {
+ assumeThat(getBrokerAdmin().supportsRestart(), is(true));
+
+ prepare();
+
+ Connection connection = getConnection();
+ try
+ {
+ Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
+ MessageProducer producer = session.createProducer(null);
+ producer.send(session.createTopic(getTestTopic("Y.Y.Y.Y")), session.createTextMessage("test"));
+ session.commit();
+ }
+ finally
+ {
+ connection.close();
+ }
+
+ assertEquals(1, getQueueDepth(DURABLE_NEVER_PERSIST_NAME));
+ assertEquals(1, getQueueDepth(NONDURABLE_ALWAYS_PERSIST_NAME));
+ assertEquals(1, getQueueDepth(DURABLE_ALWAYS_PERSIST_NAME));
+ assertEquals(1, getQueueDepth(DURABLE_DEFAULT_PERSIST_NAME));
+
+ getBrokerAdmin().restart();
+
+ assertEquals(0, getQueueDepth(DURABLE_NEVER_PERSIST_NAME));
+ assertEquals(1, getQueueDepth(DURABLE_ALWAYS_PERSIST_NAME));
+ assertEquals(1, getQueueDepth(DURABLE_DEFAULT_PERSIST_NAME));
+ assertFalse(isQueueExist(NONDURABLE_ALWAYS_PERSIST_NAME));
+ }
+
+ @Test
+ public void testSendNonPersistentMessageToAll() throws Exception
+ {
+ assumeThat(getBrokerAdmin().supportsRestart(), is(true));
+
+ prepare();
+
+ Connection connection = getConnection();
+ try
+ {
+ Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
+ MessageProducer producer = session.createProducer(null);
+ producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+ connection.start();
+ producer.send(session.createTopic(getTestTopic("Y.Y.Y.Y")), session.createTextMessage("test"));
+ session.commit();
+ }
+ finally
+ {
+ connection.close();
+ }
+
+ assertEquals(1, getQueueDepth(DURABLE_NEVER_PERSIST_NAME));
+ assertEquals(1, getQueueDepth(NONDURABLE_ALWAYS_PERSIST_NAME));
+ assertEquals(1, getQueueDepth(DURABLE_ALWAYS_PERSIST_NAME));
+ assertEquals(1, getQueueDepth(DURABLE_DEFAULT_PERSIST_NAME));
+
+ getBrokerAdmin().restart();
+
+ assertEquals(0, getQueueDepth(DURABLE_NEVER_PERSIST_NAME));
+ assertEquals(1, getQueueDepth(DURABLE_ALWAYS_PERSIST_NAME));
+ assertEquals(0, getQueueDepth(DURABLE_DEFAULT_PERSIST_NAME));
+ assertFalse(isQueueExist(NONDURABLE_ALWAYS_PERSIST_NAME));
+ }
+
+ @Test
+ public void testNonPersistentContentRetained() throws Exception
+ {
+ assumeThat(getBrokerAdmin().supportsRestart(), is(true));
+
+ prepare();
+
+ Connection connection = getConnection();
+ try
+ {
+ connection.start();
+
+ Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
+ MessageProducer producer = session.createProducer(null);
+ producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+ producer.send(session.createTopic(getTestTopic("N.N.Y.Y")), session.createTextMessage("test1"));
+ producer.send(session.createTopic(getTestTopic("Y.N.Y.Y")), session.createTextMessage("test2"));
+ session.commit();
+
+ MessageConsumer consumer = session.createConsumer(session.createQueue(DURABLE_ALWAYS_PERSIST_NAME));
+ Message msg = consumer.receive(getReceiveTimeout());
+ assertNotNull(msg);
+ assertTrue(msg instanceof TextMessage);
+ assertEquals("test2", ((TextMessage) msg).getText());
+ session.rollback();
+ }
+ finally
+ {
+ connection.close();
+ }
+
+ getBrokerAdmin().restart();
+
+ assertEquals(0, getQueueDepth(DURABLE_NEVER_PERSIST_NAME));
+ assertEquals(1, getQueueDepth(DURABLE_ALWAYS_PERSIST_NAME));
+ assertEquals(0, getQueueDepth(DURABLE_DEFAULT_PERSIST_NAME));
+
+ Connection connection2 = getConnection();
+ try
+ {
+ connection2.start();
+ Session session = connection2.createSession(true, Session.SESSION_TRANSACTED);
+
+ MessageConsumer consumer = session.createConsumer(session.createQueue(DURABLE_ALWAYS_PERSIST_NAME));
+ Message msg = consumer.receive(getReceiveTimeout());
+ assertNotNull(msg);
+ assertTrue(msg instanceof TextMessage);
+ assertEquals("test2", ((TextMessage) msg).getText());
+ session.commit();
+ }
+ finally
+ {
+ connection2.close();
+ }
+ }
+
+ @Test
+ public void testPersistentContentRetainedOnTransientQueue() throws Exception
+ {
+ prepare();
+
+ Connection connection = getConnection();
+ try
+ {
+ connection.start();
+ Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
+ MessageProducer producer = session.createProducer(null);
+ producer.setDeliveryMode(DeliveryMode.PERSISTENT);
+
+ producer.send(session.createTopic(getTestTopic("N.N.Y.Y")), session.createTextMessage("test1"));
+ session.commit();
+ MessageConsumer consumer =
+ session.createConsumer(session.createQueue(getTestQueue(DURABLE_DEFAULT_PERSIST_NAME)));
+ Message msg = consumer.receive(getReceiveTimeout());
+ assertNotNull(msg);
+ assertTrue(msg instanceof TextMessage);
+ assertEquals("test1", ((TextMessage) msg).getText());
+ session.commit();
+
+ consumer = session.createConsumer(session.createQueue(getTestQueue(NONDURABLE_ALWAYS_PERSIST_NAME)));
+ msg = consumer.receive(getReceiveTimeout());
+ assertNotNull(msg);
+ assertTrue(msg instanceof TextMessage);
+ assertEquals("test1", ((TextMessage) msg).getText());
+ session.commit();
+ }
+ finally
+ {
+ connection.close();
+ }
+ }
+
+ private boolean isQueueExist(final String queueName) throws Exception
+ {
+ try
+ {
+ performOperationUsingAmqpManagement(queueName,
+ "READ",
+ "org.apache.qpid.Queue",
+ Collections.emptyMap());
+ return true;
+ }
+ catch (AmqpManagementFacade.OperationUnsuccessfulException e)
+ {
+ if (e.getStatusCode() == 404)
+ {
+ return false;
+ }
+ else
+ {
+ throw e;
+ }
+ }
+ }
+
+ private int getQueueDepth(final String queueName) throws Exception
+ {
+ Map<String, Object> arguments =
+ Collections.singletonMap("statistics", Collections.singletonList("queueDepthMessages"));
+ Object statistics = performOperationUsingAmqpManagement(queueName,
+ "getStatistics",
+ "org.apache.qpid.Queue",
+ arguments);
+ assertNotNull("Statistics is null", statistics);
+ assertTrue("Statistics is not map", statistics instanceof Map);
+ @SuppressWarnings("unchecked")
+ Map<String, Object> statisticsMap = (Map<String, Object>) statistics;
+ assertTrue("queueDepthMessages is not present", statisticsMap.get("queueDepthMessages") instanceof Number);
+ return ((Number) statisticsMap.get("queueDepthMessages")).intValue();
+ }
+
+ private void prepare() throws Exception
+ {
+ Map<String, Object> arguments = new HashMap<>();
+ arguments.put(org.apache.qpid.server.model.Queue.MESSAGE_DURABILITY, MessageDurability.ALWAYS.name());
+ arguments.put(org.apache.qpid.server.model.Queue.DURABLE, true);
+ createEntityUsingAmqpManagement(DURABLE_ALWAYS_PERSIST_NAME, "org.apache.qpid.Queue", arguments);
+
+ arguments = new HashMap<>();
+ arguments.put(org.apache.qpid.server.model.Queue.MESSAGE_DURABILITY, MessageDurability.NEVER.name());
+ arguments.put(org.apache.qpid.server.model.Queue.DURABLE, true);
+ createEntityUsingAmqpManagement(DURABLE_NEVER_PERSIST_NAME, "org.apache.qpid.Queue", arguments);
+
+ arguments = new HashMap<>();
+ arguments.put(org.apache.qpid.server.model.Queue.MESSAGE_DURABILITY, MessageDurability.DEFAULT.name());
+ arguments.put(org.apache.qpid.server.model.Queue.DURABLE, true);
+ createEntityUsingAmqpManagement(DURABLE_DEFAULT_PERSIST_NAME, "org.apache.qpid.Queue", arguments);
+
+ arguments = new HashMap<>();
+ arguments.put(org.apache.qpid.server.model.Queue.MESSAGE_DURABILITY, MessageDurability.ALWAYS.name());
+ arguments.put(org.apache.qpid.server.model.Queue.DURABLE, false);
+ createEntityUsingAmqpManagement(NONDURABLE_ALWAYS_PERSIST_NAME, "org.apache.qpid.Queue", arguments);
+
+ arguments = new HashMap<>();
+ arguments.put("destination", DURABLE_ALWAYS_PERSIST_NAME);
+ arguments.put("bindingKey", "Y.*.*.*");
+ performOperationUsingAmqpManagement("amq.topic", "bind", "org.apache.qpid.TopicExchange", arguments);
+
+ arguments = new HashMap<>();
+ arguments.put("destination", DURABLE_NEVER_PERSIST_NAME);
+ arguments.put("bindingKey", "*.Y.*.*");
+ performOperationUsingAmqpManagement("amq.topic", "bind", "org.apache.qpid.TopicExchange", arguments);
+
+ arguments = new HashMap<>();
+ arguments.put("destination", DURABLE_DEFAULT_PERSIST_NAME);
+ arguments.put("bindingKey", "*.*.Y.*");
+ performOperationUsingAmqpManagement("amq.topic", "bind", "org.apache.qpid.TopicExchange", arguments);
+
+ arguments = new HashMap<>();
+ arguments.put("destination", NONDURABLE_ALWAYS_PERSIST_NAME);
+ arguments.put("bindingKey", "*.*.*.Y");
+ performOperationUsingAmqpManagement("amq.topic", "bind", "org.apache.qpid.TopicExchange", arguments);
+ }
+
+ private String getTestTopic(final String routingKey)
+ {
+ String topicNameFormat = getProtocol() == Protocol.AMQP_1_0 ? "amq.topic/%s" : "%s";
+ return String.format(topicNameFormat, routingKey);
+ }
+
+ private String getTestQueue(final String name)
+ {
+ String queueFormat =
+ getProtocol() == Protocol.AMQP_1_0 ? "%s" : "ADDR:%s; {create:never, node: { type: queue }}";
+ return String.format(queueFormat, name);
+ }
+}
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/a2e57db7/systests/src/test/java/org/apache/qpid/server/queue/QueueMessageDurabilityTest.java
----------------------------------------------------------------------
diff --git a/systests/src/test/java/org/apache/qpid/server/queue/QueueMessageDurabilityTest.java b/systests/src/test/java/org/apache/qpid/server/queue/QueueMessageDurabilityTest.java
deleted file mode 100644
index 7237561..0000000
--- a/systests/src/test/java/org/apache/qpid/server/queue/QueueMessageDurabilityTest.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.queue;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.NamingException;
-
-import org.apache.qpid.configuration.ClientProperties;
-import org.apache.qpid.server.store.MessageDurability;
-import org.apache.qpid.test.utils.QpidBrokerTestCase;
-
-public class QueueMessageDurabilityTest extends QpidBrokerTestCase
-{
- private static final String DURABLE_ALWAYS_PERSIST_NAME = "DURABLE_QUEUE_ALWAYS_PERSIST";
- private static final String DURABLE_NEVER_PERSIST_NAME = "DURABLE_QUEUE_NEVER_PERSIST";
- private static final String DURABLE_DEFAULT_PERSIST_NAME = "DURABLE_QUEUE_DEFAULT_PERSIST";
- private static final String NONDURABLE_ALWAYS_PERSIST_NAME = "NONDURABLE_QUEUE_ALWAYS_PERSIST";
- private Queue _durableAlwaysPersist;
- private Queue _durableNeverPersist;
- private Queue _durableDefaultPersist;
- private Queue _nonDurableAlwaysPersist;
- private String _topicNameFormat;
-
- @Override
- public void setUp() throws Exception
- {
- super.setUp();
- Connection conn = createStartedConnection();
- Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- Map<String,Object> arguments = new HashMap<>();
- arguments.put(org.apache.qpid.server.model.Queue.MESSAGE_DURABILITY, MessageDurability.ALWAYS.name());
- arguments.put(org.apache.qpid.server.model.Queue.DURABLE, true);
- _durableAlwaysPersist = createQueueWithArguments(session, DURABLE_ALWAYS_PERSIST_NAME, arguments);
-
- arguments = new HashMap<>();
- arguments.put(org.apache.qpid.server.model.Queue.MESSAGE_DURABILITY, MessageDurability.NEVER.name());
- arguments.put(org.apache.qpid.server.model.Queue.DURABLE, true);
- _durableNeverPersist = createQueueWithArguments(session, DURABLE_NEVER_PERSIST_NAME, arguments);
-
- arguments = new HashMap<>();
- arguments.put(org.apache.qpid.server.model.Queue.MESSAGE_DURABILITY, MessageDurability.DEFAULT.name());
- arguments.put(org.apache.qpid.server.model.Queue.DURABLE, true);
- _durableDefaultPersist = createQueueWithArguments(session, DURABLE_DEFAULT_PERSIST_NAME, arguments);
-
- arguments = new HashMap<>();
- arguments.put(org.apache.qpid.server.model.Queue.MESSAGE_DURABILITY,MessageDurability.ALWAYS.name());
- arguments.put(org.apache.qpid.server.model.Queue.DURABLE, false);
- _nonDurableAlwaysPersist = createQueueWithArguments(session, NONDURABLE_ALWAYS_PERSIST_NAME, arguments);
-
- bindQueue(conn.createSession(false, Session.AUTO_ACKNOWLEDGE), "amq.topic", DURABLE_ALWAYS_PERSIST_NAME, "Y.*.*.*");
- bindQueue(conn.createSession(false, Session.AUTO_ACKNOWLEDGE), "amq.topic", DURABLE_NEVER_PERSIST_NAME, "*.Y.*.*");
- bindQueue(conn.createSession(false, Session.AUTO_ACKNOWLEDGE), "amq.topic", DURABLE_DEFAULT_PERSIST_NAME, "*.*.Y.*");
- bindQueue(conn.createSession(false, Session.AUTO_ACKNOWLEDGE), "amq.topic", NONDURABLE_ALWAYS_PERSIST_NAME, "*.*.*.Y");
-
- _topicNameFormat = isBroker10() ? "amq.topic/%s" : "%s";
-
- conn.close();
- }
-
- public void testSendPersistentMessageToAll() throws Exception
- {
- Connection conn = createStartedConnection();
- Session session = conn.createSession(true, Session.SESSION_TRANSACTED);
- MessageProducer producer = session.createProducer(null);
- conn.start();
- producer.send(session.createTopic(String.format(_topicNameFormat, "Y.Y.Y.Y")), session.createTextMessage("test"));
- session.commit();
-
- assertEquals(1, getQueueDepth(conn, _durableAlwaysPersist));
- assertEquals(1, getQueueDepth(conn, _durableNeverPersist));
- assertEquals(1, getQueueDepth(conn, _durableDefaultPersist));
- assertEquals(1, getQueueDepth(conn,_nonDurableAlwaysPersist));
-
- restartDefaultBroker();
-
- conn = createStartedConnection();
- assertEquals(1, getQueueDepth(conn, _durableAlwaysPersist));
- assertEquals(0, getQueueDepth(conn, _durableNeverPersist));
- assertEquals(1, getQueueDepth(conn, _durableDefaultPersist));
-
- assertFalse(isQueueExist(conn, _nonDurableAlwaysPersist));
- }
-
- public void testSendNonPersistentMessageToAll() throws Exception
- {
- Connection conn = createStartedConnection();
- Session session = conn.createSession(true, Session.SESSION_TRANSACTED);
- MessageProducer producer = session.createProducer(null);
- producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
- conn.start();
- producer.send(session.createTopic(String.format(_topicNameFormat, "Y.Y.Y.Y")), session.createTextMessage("test"));
- session.commit();
-
- assertEquals(1, getQueueDepth(conn, _durableAlwaysPersist));
- assertEquals(1, getQueueDepth(conn, _durableNeverPersist));
- assertEquals(1, getQueueDepth(conn, _durableDefaultPersist));
- assertEquals(1, getQueueDepth(conn,_nonDurableAlwaysPersist));
-
- restartDefaultBroker();
-
- conn = createStartedConnection();
- assertEquals(1, getQueueDepth(conn, _durableAlwaysPersist));
- assertEquals(0, getQueueDepth(conn, _durableNeverPersist));
- assertEquals(0, getQueueDepth(conn, _durableDefaultPersist));
-
- assertFalse(isQueueExist(conn, _nonDurableAlwaysPersist));
-
- }
-
- public void testNonPersistentContentRetained() throws Exception
- {
- Connection conn = createStartedConnection();
- Session session = conn.createSession(true, Session.SESSION_TRANSACTED);
- MessageProducer producer = session.createProducer(null);
- producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
- conn.start();
- producer.send(session.createTopic(String.format(_topicNameFormat, "N.N.Y.Y")), session.createTextMessage("test1"));
- producer.send(session.createTopic(String.format(_topicNameFormat, "Y.N.Y.Y")), session.createTextMessage("test2"));
- session.commit();
- MessageConsumer consumer = session.createConsumer(_durableAlwaysPersist);
- Message msg = consumer.receive(getReceiveTimeout());
- assertNotNull(msg);
- assertTrue(msg instanceof TextMessage);
- assertEquals("test2", ((TextMessage) msg).getText());
- session.rollback();
- restartDefaultBroker();
- conn = createStartedConnection();
- session = conn.createSession(true, Session.SESSION_TRANSACTED);
- assertEquals(1, getQueueDepth(conn, _durableAlwaysPersist));
- assertEquals(0, getQueueDepth(conn, _durableNeverPersist));
- assertEquals(0, getQueueDepth(conn, _durableDefaultPersist));
-
- consumer = session.createConsumer(_durableAlwaysPersist);
- msg = consumer.receive(getReceiveTimeout());
- assertNotNull(msg);
- assertTrue(msg instanceof TextMessage);
- assertEquals("test2", ((TextMessage)msg).getText());
- session.commit();
- }
-
- public void testPersistentContentRetainedOnTransientQueue() throws Exception
- {
- setTestClientSystemProperty(ClientProperties.QPID_DECLARE_QUEUES_PROP_NAME, "false");
- Connection conn = createStartedConnection();
- Session session = conn.createSession(true, Session.SESSION_TRANSACTED);
- MessageProducer producer = session.createProducer(null);
- producer.setDeliveryMode(DeliveryMode.PERSISTENT);
- conn.start();
- producer.send(session.createTopic(String.format(_topicNameFormat, "N.N.Y.Y")), session.createTextMessage("test1"));
- session.commit();
- MessageConsumer consumer = session.createConsumer(_durableDefaultPersist);
- Message msg = consumer.receive(getReceiveTimeout());
- assertNotNull(msg);
- assertTrue(msg instanceof TextMessage);
- assertEquals("test1", ((TextMessage)msg).getText());
- session.commit();
- System.gc();
- consumer = session.createConsumer(_nonDurableAlwaysPersist);
- msg = consumer.receive(getReceiveTimeout());
- assertNotNull(msg);
- assertTrue(msg instanceof TextMessage);
- assertEquals("test1", ((TextMessage)msg).getText());
- session.commit();
- }
-
- private Connection createStartedConnection() throws JMSException, NamingException
- {
- Connection conn = getConnection();
- conn.start();
- return conn;
- }
-
- private Queue createQueueWithArguments(final Session session,
- final String testQueueName,
- final Map<String, Object> arguments) throws Exception
- {
- createEntityUsingAmqpManagement(testQueueName, session, "org.apache.qpid.Queue", arguments);
- return getQueueFromName(session, testQueueName);
- }
-
- private void bindQueue(final Session session, final String exchange, final String queueName,
- final String bindingKey) throws Exception
- {
-
- final Map<String, Object> arguments = new HashMap<>();
- arguments.put("destination", queueName);
- arguments.put("bindingKey", bindingKey);
- performOperationUsingAmqpManagement(exchange, "bind", session, "org.apache.qpid.TopicExchange", arguments);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/a2e57db7/test-profiles/CPPExcludes
----------------------------------------------------------------------
diff --git a/test-profiles/CPPExcludes b/test-profiles/CPPExcludes
index 09e7152..26c3573 100755
--- a/test-profiles/CPPExcludes
+++ b/test-profiles/CPPExcludes
@@ -136,9 +136,6 @@ org.apache.qpid.client.failover.MultipleBrokersFailoverTest#*
org.apache.qpid.client.HeartbeatTest#testUnidirectionalHeartbeating
org.apache.qpid.client.HeartbeatTest#testHeartbeatsEnabledBrokerSide
-// Tests queue message durability settings which are a Qpid Broker-J specific feature
-org.apache.qpid.server.queue.QueueMessageDurabilityTest#*
-
// CPP Broker does not timeout connections with no activity like the Qpid Broker-J
org.apache.qpid.transport.ProtocolNegotiationTest#testNoProtocolHeaderSent_BrokerClosesConnection
org.apache.qpid.transport.ProtocolNegotiationTest#testNoConnectionOpenSent_BrokerClosesConnection
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/a2e57db7/test-profiles/JavaTransientExcludes
----------------------------------------------------------------------
diff --git a/test-profiles/JavaTransientExcludes b/test-profiles/JavaTransientExcludes
index ec48a4a..66cd5e8 100644
--- a/test-profiles/JavaTransientExcludes
+++ b/test-profiles/JavaTransientExcludes
@@ -23,8 +23,6 @@ org.apache.qpid.server.store.SplitStoreTest#*
org.apache.qpid.server.logging.AlertingTest#testAlertingReallyWorksWithRestart
org.apache.qpid.server.logging.AlertingTest#testAlertingReallyWorksWithChanges
-org.apache.qpid.server.queue.QueueMessageDurabilityTest#*
-
org.apache.qpid.server.store.berkeleydb.*
org.apache.qpid.server.store.berkeleydb.replication.*
org.apache.qpid.server.store.berkeleydb.upgrade.*
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org