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/22 21:54:12 UTC
qpid-broker-j git commit: QPID-6933: [System Tests] Move AMQP 0-x
client specific ProducerFlowControlTest to client suite
Repository: qpid-broker-j
Updated Branches:
refs/heads/master f86ff21d0 -> c793b7276
QPID-6933: [System Tests] Move AMQP 0-x client specific ProducerFlowControlTest 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/c793b727
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/c793b727
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/c793b727
Branch: refs/heads/master
Commit: c793b7276c13a9a06e5269932480652bcfa68565
Parents: f86ff21
Author: Keith Wall <kw...@apache.org>
Authored: Mon Jan 22 21:51:46 2018 +0000
Committer: Keith Wall <kw...@apache.org>
Committed: Mon Jan 22 21:51:46 2018 +0000
----------------------------------------------------------------------
.../test/client/ProducerFlowControlTest.java | 126 -------------------
test-profiles/CPPExcludes | 3 -
test-profiles/Java10Excludes | 3 -
3 files changed, 132 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/c793b727/systests/src/test/java/org/apache/qpid/test/client/ProducerFlowControlTest.java
----------------------------------------------------------------------
diff --git a/systests/src/test/java/org/apache/qpid/test/client/ProducerFlowControlTest.java b/systests/src/test/java/org/apache/qpid/test/client/ProducerFlowControlTest.java
deleted file mode 100644
index f21b802..0000000
--- a/systests/src/test/java/org/apache/qpid/test/client/ProducerFlowControlTest.java
+++ /dev/null
@@ -1,126 +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;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-
-import org.apache.qpid.client.AMQDestination;
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.server.logging.AbstractTestLogging;
-import org.apache.qpid.systest.rest.RestTestHelper;
-import org.apache.qpid.test.utils.TestBrokerConfiguration;
-
-public class ProducerFlowControlTest extends AbstractTestLogging
-{
- private static final long TIMEOUT = 5000;
- private Queue _queue;
- private Connection _producerConnection;
- private Session _producerSession;
- private RestTestHelper _restTestHelper;
- private String _queueUrl;
- private MessageProducer _producer;
- private BytesMessage _message;
-
- @Override
- public void setUp() throws Exception
- {
- getDefaultBrokerConfiguration().addHttpManagementConfiguration();
- super.setUp();
-
- _restTestHelper = new RestTestHelper(getDefaultBroker().getHttpPort());
-
- setTestClientSystemProperty("qpid.flow_control_wait_failure","3000");
- setTestClientSystemProperty("qpid.flow_control_wait_notify_period","1000");
-
- _producerConnection = getConnectionWithSyncPublishing();
- _producerSession = _producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- String queueName = getTestQueueName();
- _queueUrl = String.format("queue/%1$s/%1$s/%2$s", TestBrokerConfiguration.ENTRY_NAME_VIRTUAL_HOST, queueName);
- _queue = createAndBindQueueWithFlowControlEnabled(_producerSession, queueName, 1000, 800);
-
- _producer = _producerSession.createProducer(_queue);
- _message = _producerSession.createBytesMessage();
- _message.writeBytes(new byte[1100]);
-
- _monitor.markDiscardPoint();
- }
-
- public void testClientLogMessages() throws Exception
- {
- _producer.send(_message);
- _restTestHelper.waitForAttributeChanged(_queueUrl, org.apache.qpid.server.model.Queue.QUEUE_FLOW_STOPPED, Boolean.TRUE);
- // Ensure that the client has processed the incoming flow/messagestop
- _producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE).close();
- try
- {
- _producer.send(_message);
- fail("Producer should be blocked by flow control");
- }
- catch (JMSException e)
- {
- final String expectedMsg = isBroker010() ? "Exception when sending message:timed out waiting for message credit"
- : "Unable to send message for 3 seconds due to broker enforced flow control";
- assertEquals("Unexpected exception reason", expectedMsg, e.getMessage());
- }
-
- List<String> results = waitAndFindMatches("Message send delayed by", TIMEOUT);
- assertTrue("No delay messages logged by client",results.size()!=0);
-
- List<String> failedMessages = waitAndFindMatches("Message send failed due to timeout waiting on broker enforced"
- + " flow control", TIMEOUT);
- assertEquals("Incorrect number of send failure messages logged by client (got " + results.size() + " delay "
- + "messages)",1,failedMessages.size());
- }
-
-
- private Queue createAndBindQueueWithFlowControlEnabled(Session session,
- String queueName,
- int capacity,
- int resumeCapacity) throws Exception
- {
- final Map<String, Object> arguments = new HashMap<String, Object>();
- arguments.put("x-qpid-capacity", capacity);
- arguments.put("x-qpid-flow-resume-capacity", resumeCapacity);
- ((AMQSession<?, ?>) session).createQueue(queueName, true, false, false, arguments);
- Queue queue = session.createQueue("direct://amq.direct/"
- + queueName
- + "/"
- + queueName
- + "?durable='"
- + false
- + "'&autodelete='"
- + true
- + "'");
- ((AMQSession<?, ?>) session).declareAndBind((AMQDestination) queue);
- return queue;
- }
-}
-
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/c793b727/test-profiles/CPPExcludes
----------------------------------------------------------------------
diff --git a/test-profiles/CPPExcludes b/test-profiles/CPPExcludes
index 68acca2..c0de09c 100755
--- a/test-profiles/CPPExcludes
+++ b/test-profiles/CPPExcludes
@@ -54,9 +54,6 @@ org.apache.qpid.server.queue.LiveQueueOperationsTest#*
// QPID-2118 : JMS client for AMQP 0-10 has different error handling then 0-8 code path
org.apache.qpid.test.client.message.SelectorTest#testRuntimeSelectorError
-//QPID-942 : Implemented Channel.Flow based Producer Side flow control to the Qpid Broker-J (not in CPP Broker)
-org.apache.qpid.test.client.ProducerFlowControlTest#*
-
//QPID-3986 : Flow control invoked on total store disk usage
org.apache.qpid.server.store.StoreOverfullTest#*
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/c793b727/test-profiles/Java10Excludes
----------------------------------------------------------------------
diff --git a/test-profiles/Java10Excludes b/test-profiles/Java10Excludes
index 27ef27c..709399f 100644
--- a/test-profiles/Java10Excludes
+++ b/test-profiles/Java10Excludes
@@ -36,9 +36,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
-// Tests are tests of the 0-x client behaviour
-org.apache.qpid.test.client.ProducerFlowControlTest#*
-
// Message compression not currently supported by the 1.0 client
org.apache.qpid.systest.rest.MessageContentCompressionRestTest#*
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org