You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2018/01/21 10:11:15 UTC
[4/5] qpid-broker-j git commit: QPID-6933: [System Tests] Move AMQP
0-x client specific JMSDestinationTest to client suite
QPID-6933: [System Tests] Move AMQP 0-x client specific JMSDestinationTest to client suite
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/b6934dfc
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/b6934dfc
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/b6934dfc
Branch: refs/heads/master
Commit: b6934dfcbc07c9f2ddd9c79e5a07c1d2245df3f4
Parents: 799247d
Author: Keith Wall <kw...@apache.org>
Authored: Sun Jan 21 09:47:09 2018 +0000
Committer: Keith Wall <kw...@apache.org>
Committed: Sun Jan 21 09:47:09 2018 +0000
----------------------------------------------------------------------
.../test/client/message/JMSDestinationTest.java | 172 -------------------
test-profiles/Java10Excludes | 7 -
test-profiles/JavaPre010Excludes | 3 -
test-profiles/cpp.excludes | 2 -
4 files changed, 184 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/b6934dfc/systests/src/test/java/org/apache/qpid/test/client/message/JMSDestinationTest.java
----------------------------------------------------------------------
diff --git a/systests/src/test/java/org/apache/qpid/test/client/message/JMSDestinationTest.java b/systests/src/test/java/org/apache/qpid/test/client/message/JMSDestinationTest.java
deleted file mode 100644
index 1fcc494..0000000
--- a/systests/src/test/java/org/apache/qpid/test/client/message/JMSDestinationTest.java
+++ /dev/null
@@ -1,172 +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.test.client.message;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-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 org.apache.qpid.client.AMQDestination;
-import org.apache.qpid.client.CustomJMSXProperty;
-import org.apache.qpid.configuration.ClientProperties;
-import org.apache.qpid.test.utils.QpidBrokerTestCase;
-
-/**
- * From the API Docs getJMSDestination:
- *
- * When a message is received, its JMSDestination value must be equivalent to
- * the value assigned when it was sent.
- */
-public class JMSDestinationTest extends QpidBrokerTestCase
-{
-
- private Connection _connection;
- private Session _session;
-
- @Override
- public void setUp() throws Exception
- {
- super.setUp();
-
- _connection = getConnection();
-
- _session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- }
-
- /**
- * Test a message received without the JMS_QPID_DESTTYPE can be resent
- * and correctly have the property set.
- *
- * To do this we need to create a 0-10 connection and send a message
- * which is then received by a 0-8/9 client.
- *
- * @throws Exception
- */
- public void testReceiveResend() throws Exception
- {
- // Create a 0-10 Connection and send message
- setSystemProperty(ClientProperties.AMQP_VERSION, "0-10");
-
- Connection connection010 = getConnection();
-
- Session session010 = connection010.createSession(true, Session.SESSION_TRANSACTED);
-
- // Create queue for testing
- Queue queue = session010.createQueue(getTestQueueName());
-
- // Ensure queue exists
- session010.createConsumer(queue).close();
-
- sendMessage(session010, queue, 1);
-
- // Close the 010 connection
- connection010.close();
-
- // Create a 0-8 Connection and receive message
- setSystemProperty(ClientProperties.AMQP_VERSION, "0-8");
-
- Connection connection08 = getConnection();
-
- Session session08 = connection08.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- MessageConsumer consumer = session08.createConsumer(queue);
-
- connection08.start();
-
- Message message = consumer.receive(1000);
-
- assertNotNull("Didn't receive 0-10 message.", message);
-
- // Validate that JMS_QPID_DESTTYPE is not set
- try
- {
- message.getIntProperty(CustomJMSXProperty.JMS_QPID_DESTTYPE.toString());
- fail("JMS_QPID_DESTTYPE should not be set, so should throw NumberFormatException");
- }
- catch (NumberFormatException nfe)
- {
-
- }
-
- // Resend message back to queue and validate that
- // a) getJMSDestination works without the JMS_QPID_DESTTYPE
- // b) we can actually send without a BufferOverFlow.
-
- MessageProducer producer = session08.createProducer(queue);
- producer.send(message);
-
- message = consumer.receive(1000);
-
- assertNotNull("Didn't receive recent 0-8 message.", message);
-
- // Validate that JMS_QPID_DESTTYPE is not set
- assertEquals("JMS_QPID_DESTTYPE should be set to a Queue", AMQDestination.QUEUE_TYPE,
- message.getIntProperty(CustomJMSXProperty.JMS_QPID_DESTTYPE.toString()));
-
- }
-
- public void testQueueWithBindingUrlUsingCustomExchange() throws Exception
- {
- String exchangeName = "exch_" + getTestQueueName();
- String queueName = "queue_" + getTestQueueName();
-
- String address = String.format("direct://%s/%s/%s?routingkey='%s'", exchangeName, queueName, queueName, queueName);
- sendReceive(address);
- }
-
- public void testQueueWithBindingUrlUsingAmqDirectExchange() throws Exception
- {
- String queueName = getTestQueueName();
- String address = String.format("direct://amq.direct/%s/%s?routingkey='%s'", queueName, queueName, queueName);
- sendReceive(address);
- }
-
- public void testQueueWithBindingUrlUsingDefaultExchange() throws Exception
- {
- String queueName = getTestQueueName();
- String address = String.format("direct:///%s/%s?routingkey='%s'", queueName, queueName, queueName);
- sendReceive(address);
- }
-
- private void sendReceive(String address) throws JMSException, Exception
- {
- Destination dest = _session.createQueue(address);
- MessageConsumer consumer = _session.createConsumer(dest);
-
- _connection.start();
-
- sendMessage(_session, dest, 1);
-
- Message receivedMessage = consumer.receive(10000);
-
- assertNotNull("Message should not be null", receivedMessage);
-
- Destination receivedDestination = receivedMessage.getJMSDestination();
-
- assertNotNull("JMSDestination should not be null", receivedDestination);
- assertEquals("JMSDestination should match that sent", address, receivedDestination.toString());
- }
-}
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/b6934dfc/test-profiles/Java10Excludes
----------------------------------------------------------------------
diff --git a/test-profiles/Java10Excludes b/test-profiles/Java10Excludes
index 99db5ce..aa97f78 100644
--- a/test-profiles/Java10Excludes
+++ b/test-profiles/Java10Excludes
@@ -48,13 +48,6 @@ org.apache.qpid.systest.rest.MessageContentCompressionRestTest#*
// Tests the interaction between the Broker's supported protocols and what the 0-x client agrees to
org.apache.qpid.server.SupportedProtocolVersionsTest#*
-// test of 0-10 client specific behaviour
-org.apache.qpid.test.client.message.JMSDestinationTest#testReceiveResend
-// BURL specific tests
-org.apache.qpid.test.client.message.JMSDestinationTest#testQueueWithBindingUrlUsingCustomExchange
-org.apache.qpid.test.client.message.JMSDestinationTest#testQueueWithBindingUrlUsingAmqDirectExchange
-org.apache.qpid.test.client.message.JMSDestinationTest#testQueueWithBindingUrlUsingDefaultExchange
-
// Durable topic subscriptions will be reimplemented with the shared topic subscriptions (QPID-7569)
org.apache.qpid.server.logging.ConsumerLoggingTest#testSubscriptionCreateDurable
org.apache.qpid.server.logging.ConsumerLoggingTest#testSubscriptionCreateDurableWithArguments
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/b6934dfc/test-profiles/JavaPre010Excludes
----------------------------------------------------------------------
diff --git a/test-profiles/JavaPre010Excludes b/test-profiles/JavaPre010Excludes
index 538a93e..7d3925e 100644
--- a/test-profiles/JavaPre010Excludes
+++ b/test-profiles/JavaPre010Excludes
@@ -21,9 +21,6 @@
//Exclude the following from brokers using the 0-8/0-9/0-9-1 protocols
//======================================================================
-// These tests requires a broker capable of 0-8/0-9/0-9-1 and 0-10 concurrently
-org.apache.qpid.test.client.message.JMSDestinationTest#testReceiveResend
-
// Those tests are written against the 0.10 path
org.apache.qpid.client.SynchReceiveTest#testReceiveNoWait
org.apache.qpid.server.logging.ChannelLoggingTest#testChannelClosedOnExclusiveQueueDeclaredOnDifferentSession
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/b6934dfc/test-profiles/cpp.excludes
----------------------------------------------------------------------
diff --git a/test-profiles/cpp.excludes b/test-profiles/cpp.excludes
index d41d8fe..0c6c80e 100644
--- a/test-profiles/cpp.excludes
+++ b/test-profiles/cpp.excludes
@@ -21,8 +21,6 @@
//Exclude the following tests when running all cpp test profilies
//======================================================================
-// This test requires a broker capable of 0-8/9 and 0-10
-org.apache.qpid.test.client.message.JMSDestinationTest#testReceiveResend
//BDB System Tests
org.apache.qpid.server.store.berkeleydb.*
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org