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 2017/12/22 20:27:25 UTC
[3/3] qpid-broker-j git commit: QPID-6933: [System Tests] Remove
explict exchange/queue delete tests - these are mainly concerned with non-JMS
implementations methods of the legacy client.
QPID-6933: [System Tests] Remove explict exchange/queue delete tests - these are mainly concerned with non-JMS implementations methods of the legacy client.
The server side behaviour is now covered by prootcol tests.
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/8e78fbe6
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/8e78fbe6
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/8e78fbe6
Branch: refs/heads/master
Commit: 8e78fbe605ab8c5c6a7dfc89890793f160e75d71
Parents: c405c84
Author: Keith Wall <kw...@apache.org>
Authored: Fri Dec 22 16:10:04 2017 +0000
Committer: Keith Wall <kw...@apache.org>
Committed: Fri Dec 22 16:10:08 2017 +0000
----------------------------------------------------------------------
.../qpid/client/session/ExchangeDeleteTest.java | 82 --------------
.../qpid/client/session/QueueDeclareTest.java | 98 ----------------
.../qpid/client/session/QueueDeleteTest.java | 112 -------------------
test-profiles/Java10Excludes | 5 -
4 files changed, 297 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/8e78fbe6/systests/src/test/java/org/apache/qpid/client/session/ExchangeDeleteTest.java
----------------------------------------------------------------------
diff --git a/systests/src/test/java/org/apache/qpid/client/session/ExchangeDeleteTest.java b/systests/src/test/java/org/apache/qpid/client/session/ExchangeDeleteTest.java
deleted file mode 100644
index 4a7d821..0000000
--- a/systests/src/test/java/org/apache/qpid/client/session/ExchangeDeleteTest.java
+++ /dev/null
@@ -1,82 +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.client.session;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.configuration.ClientProperties;
-import org.apache.qpid.exchange.ExchangeDefaults;
-import org.apache.qpid.server.protocol.ErrorCodes;
-import org.apache.qpid.test.utils.QpidBrokerTestCase;
-
-public class ExchangeDeleteTest extends QpidBrokerTestCase
-{
- private Connection _connection;
- private AMQSession<?, ?> _session;
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- // Turn off queue declare side effect of creating consumer
- setTestClientSystemProperty(ClientProperties.QPID_DECLARE_QUEUES_PROP_NAME, "false");
- setTestClientSystemProperty(ClientProperties.QPID_DECLARE_EXCHANGES_PROP_NAME, "false");
- setTestClientSystemProperty(ClientProperties.QPID_BIND_QUEUES_PROP_NAME, "false");
-
- _connection = getConnection();
- _connection.start();
- _session = (AMQSession<?, ?>) _connection.createSession(true, Session.SESSION_TRANSACTED);
- }
-
- public void testDeleteExchange() throws Exception
- {
- String exchangeName = getTestName();
-
- _session.declareExchange(exchangeName, ExchangeDefaults.DIRECT_EXCHANGE_CLASS, false);
-
- _session.deleteExchange(exchangeName);
- }
-
- public void testDeleteNonExistentExchange() throws Exception
- {
- String exchangeName = getTestName();
-
- try
- {
- _session.deleteExchange(exchangeName);
- fail("Exception not thrown");
- }
- catch (JMSException e)
- {
- // PASS
- assertEquals("Expecting exchange not found",
- String.valueOf(ErrorCodes.NOT_FOUND),
- e.getErrorCode());
- }
-
- assertTrue("Session expected to be closed", _session.isClosed());
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/8e78fbe6/systests/src/test/java/org/apache/qpid/client/session/QueueDeclareTest.java
----------------------------------------------------------------------
diff --git a/systests/src/test/java/org/apache/qpid/client/session/QueueDeclareTest.java b/systests/src/test/java/org/apache/qpid/client/session/QueueDeclareTest.java
deleted file mode 100644
index 748e0fb..0000000
--- a/systests/src/test/java/org/apache/qpid/client/session/QueueDeclareTest.java
+++ /dev/null
@@ -1,98 +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.client.session;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-
-import org.apache.qpid.client.AMQDestination;
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.test.utils.QpidBrokerTestCase;
-
-public class QueueDeclareTest extends QpidBrokerTestCase
-{
- private Connection _connection;
- private AMQSession<?, ?> _session;
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- _connection = getConnection();
- _connection.start();
- _session = (AMQSession<?, ?>) _connection.createSession(true, Session.SESSION_TRANSACTED);
- }
-
- public void testDeclareAndBindWhenQueueIsNotSpecifiedInDestinationUrl() throws Exception
- {
- AMQDestination destination = (AMQDestination) _session.createQueue("topic://amq.topic//?routingkey='testTopic'");
-
- assertEquals("Non empty queue name unexpectedly generated by parser : " + destination.getAMQQueueName(), "", destination.getAMQQueueName());
-
- _session.declareAndBind(destination);
-
- assertFalse("Non empty queue name should have been generated by declareAndBind",
- "".equals(destination.getAMQQueueName()));
-
- sendMessage(_session, destination, 1);
- receiveMessage(destination);
- }
-
- public void testDeclareIgnoresNonDurableFlagIfDurableQueueAlreadyExists() throws Exception
- {
- String format = "direct://amq.direct//%s?durable='%s'";
- AMQDestination durable = (AMQDestination) _session.createQueue(String.format(format, getTestQueueName(), true));
- AMQDestination nondurable = (AMQDestination) _session.createQueue(String.format(format, getTestQueueName(), false));
-
- verifyDurabilityIgnoreIfQueueExists(durable, nondurable);
- }
-
- public void testDeclareIgnoresDurableFlagIfNonDurableQueueAlreadyExists() throws Exception
- {
- String format = "direct://amq.direct//%s?durable='%s'";
- AMQDestination nondurable = (AMQDestination) _session.createQueue(String.format(format, getTestQueueName(), false));
- AMQDestination durable = (AMQDestination) _session.createQueue(String.format(format, getTestQueueName(), true));
-
- verifyDurabilityIgnoreIfQueueExists(nondurable, durable);
- }
-
- private void verifyDurabilityIgnoreIfQueueExists(final AMQDestination firstDeclare,
- final AMQDestination secondDeclare) throws Exception
- {
- _session.declareAndBind(firstDeclare);
-
- sendMessage(_session, firstDeclare, 1);
-
- _session.declareAndBind(secondDeclare);
- receiveMessage(secondDeclare);
- }
-
- private void receiveMessage(final Destination destination) throws Exception
- {
- MessageConsumer consumer = _session.createConsumer(destination);
- Message message = consumer.receive(RECEIVE_TIMEOUT);
- assertNotNull("Message not received", message);
- _session.commit();
- }
-}
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/8e78fbe6/systests/src/test/java/org/apache/qpid/client/session/QueueDeleteTest.java
----------------------------------------------------------------------
diff --git a/systests/src/test/java/org/apache/qpid/client/session/QueueDeleteTest.java b/systests/src/test/java/org/apache/qpid/client/session/QueueDeleteTest.java
deleted file mode 100644
index 0430339..0000000
--- a/systests/src/test/java/org/apache/qpid/client/session/QueueDeleteTest.java
+++ /dev/null
@@ -1,112 +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.client.session;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-
-import org.apache.qpid.client.AMQDestination;
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.configuration.ClientProperties;
-import org.apache.qpid.server.protocol.ErrorCodes;
-import org.apache.qpid.test.utils.QpidBrokerTestCase;
-
-public class QueueDeleteTest extends QpidBrokerTestCase
-{
- private Connection _connection;
- private AMQSession<?, ?> _session;
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- // Turn off queue declare side effect of creating consumer
- setTestClientSystemProperty(ClientProperties.QPID_DECLARE_QUEUES_PROP_NAME, "false");
- setTestClientSystemProperty(ClientProperties.QPID_DECLARE_EXCHANGES_PROP_NAME, "false");
- setTestClientSystemProperty(ClientProperties.QPID_BIND_QUEUES_PROP_NAME, "false");
-
- _connection = getConnection();
- _connection.start();
- _session = (AMQSession<?, ?>) _connection.createSession(true, Session.SESSION_TRANSACTED);
- }
-
- public void testDeleteQueue() throws Exception
- {
- AMQDestination destination = (AMQDestination) _session.createQueue(String.format("direct://amq.direct//%s", getTestQueueName()));
-
- _session.declareAndBind(destination);
-
- sendMessage(_session, destination, 2);
-
- receiveMessage(destination);
-
- _session.deleteQueue(destination.getQueueName());
-
- // Trying to consume from a queue that does not exist will cause an exception
- try
- {
- _session.createConsumer(destination);
- fail("Exception not thrown");
- }
- catch (JMSException e)
- {
- // PASS
- assertEquals("Expecting queue not found",
- String.valueOf(ErrorCodes.NOT_FOUND),
- e.getErrorCode());
- }
-
- assertTrue("Session expected to be closed", _session.isClosed());
- }
-
- public void testDeleteNonExistentQueue() throws Exception
- {
- AMQDestination destination = (AMQDestination) _session.createQueue(String.format("direct://amq.direct//%s", getTestQueueName()));
-
- try
- {
- _session.deleteQueue(destination.getQueueName());
- fail("Exception not thrown");
- }
- catch (JMSException e)
- {
- // PASS
- assertEquals("Expecting queue not found",
- String.valueOf(ErrorCodes.NOT_FOUND),
- e.getErrorCode());
- }
-
- assertTrue("Session expected to be closed", _session.isClosed());
- }
-
-
- private void receiveMessage(final Destination destination) throws Exception
- {
- MessageConsumer consumer = _session.createConsumer(destination);
- Message message = consumer.receive(RECEIVE_TIMEOUT);
- assertNotNull("Message not received", message);
- _session.commit();
- consumer.close();
- }
-}
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/8e78fbe6/test-profiles/Java10Excludes
----------------------------------------------------------------------
diff --git a/test-profiles/Java10Excludes b/test-profiles/Java10Excludes
index a8cee14..fe30ede 100644
--- a/test-profiles/Java10Excludes
+++ b/test-profiles/Java10Excludes
@@ -66,11 +66,6 @@ org.apache.qpid.test.unit.client.AMQSessionTest#*
// This test is concerned with the 0-x client establishing a connection to a supported version
org.apache.qpid.transport.ProtocolNegotiationTest#testProtocolNegotiationFromUnsupportedVersion
-// These tests are testing extensions to JMS on the 0-x client to manipulate AMQP 0-x model objects like Queues and Exchanges
-org.apache.qpid.client.session.ExchangeDeleteTest#*
-org.apache.qpid.client.session.QueueDeclareTest#*
-org.apache.qpid.client.session.QueueDeleteTest#*
-
// Tests are tests of the 0-x client behaviour
org.apache.qpid.test.client.ProducerFlowControlTest#*
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org