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/03/15 18:07:56 UTC
[1/3] qpid-broker-j git commit: QPID-8123: [System Tests] Fix
destination URL in BDBStoreUpgradeTestPreparer
Repository: qpid-broker-j
Updated Branches:
refs/heads/master 06f06e4fb -> 1e01c1fbe
QPID-8123: [System Tests] Fix destination URL in BDBStoreUpgradeTestPreparer
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/59f78b05
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/59f78b05
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/59f78b05
Branch: refs/heads/master
Commit: 59f78b05dce8232208f53924e12778e58d2fdb2b
Parents: 06f06e4
Author: Alex Rudyy <or...@apache.org>
Authored: Thu Mar 15 17:12:27 2018 +0000
Committer: Alex Rudyy <or...@apache.org>
Committed: Thu Mar 15 17:13:02 2018 +0000
----------------------------------------------------------------------
.../berkeleydb/BDBStoreUpgradeTestPreparer.java | 50 +++++++++++++-------
1 file changed, 34 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/59f78b05/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgradeTestPreparer.java
----------------------------------------------------------------------
diff --git a/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgradeTestPreparer.java b/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgradeTestPreparer.java
index 750cc07..b623cd6 100644
--- a/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgradeTestPreparer.java
+++ b/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgradeTestPreparer.java
@@ -20,6 +20,7 @@
*/
package org.apache.qpid.server.store.berkeleydb;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
@@ -92,7 +93,12 @@ public class BDBStoreUpgradeTestPreparer
{
Connection connection = _connFac.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- Destination destination = session.createQueue(NON_DURABLE_QUEUE_NAME);
+ Destination destination = session.createQueue(String.format(
+ "ADDR: %s; {create:always, node: {type: queue, durable: false, x-bindings:[{exchange: '%s', key: %s}]}}",
+ NON_DURABLE_QUEUE_NAME,
+ "amq.direct",
+ NON_DURABLE_QUEUE_NAME));
+
session.createConsumer(destination).close();
MessageProducer messageProducer = session.createProducer(destination);
sendMessages(session, messageProducer, destination, DeliveryMode.PERSISTENT, 1024, 3);
@@ -120,7 +126,11 @@ public class BDBStoreUpgradeTestPreparer
connection.setExceptionListener(e -> LOGGER.error("Error setting exception listener for connection", e));
// Create a session on the connection, transacted to confirm delivery
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
- Queue queue = session.createQueue(QUEUE_NAME);
+ Queue queue = session.createQueue(String.format(
+ "ADDR: %s; {create:always, node: {type: queue, durable: true, x-bindings:[{exchange: '%s', key: %s}]}}",
+ QUEUE_NAME,
+ "amq.direct",
+ QUEUE_NAME));
// Create a consumer to ensure the queue gets created
// (and enter it into the store, as queues are made durable by default)
MessageConsumer messageConsumer = session.createConsumer(queue);
@@ -165,11 +175,19 @@ public class BDBStoreUpgradeTestPreparer
createAndBindQueueOnBroker(session, QUEUE_WITH_DLQ_NAME, queueWithDLQArguments);
// Send message to the DLQ
- Queue dlq = session.createQueue("fanout://" + QUEUE_WITH_DLQ_NAME + "_DLE//does-not-matter");
+ Queue dlq = session.createQueue("BURL:fanout://" + QUEUE_WITH_DLQ_NAME + "_DLE//does-not-matter");
MessageProducer dlqMessageProducer = session.createProducer(dlq);
sendMessages(session, dlqMessageProducer, dlq, DeliveryMode.PERSISTENT, 1*1024, 1);
session.commit();
- Queue customQueue = createAndBindQueueOnBroker(session, TEST_QUEUE_NAME, null, TEST_EXCHANGE_NAME, "direct");
+
+ session.createProducer(session.createTopic(
+ String.format("BURL:direct://%s//?durable='true'", TEST_EXCHANGE_NAME))).close();
+
+ Queue customQueue = createAndBindQueueOnBroker(session,
+ TEST_QUEUE_NAME,
+ Collections.emptyMap(),
+ TEST_EXCHANGE_NAME
+ );
MessageProducer customQueueMessageProducer = session.createProducer(customQueue);
sendMessages(session, customQueueMessageProducer, customQueue, DeliveryMode.PERSISTENT, 1*1024, 1);
session.commit();
@@ -183,18 +201,25 @@ public class BDBStoreUpgradeTestPreparer
private Queue createAndBindQueueOnBroker(Session session, String queueName, final Map<String, Object> arguments) throws Exception
{
- return createAndBindQueueOnBroker(session, queueName, arguments, "amq.direct", "direct");
+ return createAndBindQueueOnBroker(session, queueName, arguments, "amq.direct");
}
- private Queue createAndBindQueueOnBroker(Session session, String queueName, final Map<String, Object> arguments, String exchangeName, String exchangeType) throws Exception
+ private Queue createAndBindQueueOnBroker(Session session,
+ String queueName,
+ final Map<String, Object> arguments,
+ String exchangeName) throws Exception
{
final String declareArgs = arguments.entrySet()
.stream()
.map(entry -> String.format("'%s' : %s", entry.getKey(), entry.getValue()))
- .collect(Collectors.joining("{", "}", ","));
+ .collect(Collectors.joining(",", "{", "}"));
Queue queue = session.createQueue(String.format(
- "ADDR: %s; {create:always, node: {type: queue, x-bindings:[{exchange: '%s', key: %s}], x-declare: {arguments:%s}}", queueName, exchangeName, queueName, declareArgs));
+ "ADDR: %s; {create:always, node: {type: queue, x-bindings:[{exchange: '%s', key: %s}], x-declare: {arguments:%s}}}",
+ queueName,
+ exchangeName,
+ queueName,
+ declareArgs));
return queue;
}
@@ -234,14 +259,7 @@ public class BDBStoreUpgradeTestPreparer
// Create a connection
TopicConnection connection = _topciConnFac.createTopicConnection();
connection.start();
- connection.setExceptionListener(new ExceptionListener()
- {
- @Override
- public void onException(JMSException e)
- {
- LOGGER.error("Error setting exception listener for connection", e);
- }
- });
+ connection.setExceptionListener(e -> LOGGER.error("Error setting exception listener for connection", e));
// Create a session on the connection, transacted to confirm delivery
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
Topic topic = session.createTopic(SELECTOR_TOPIC_NAME);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[2/3] qpid-broker-j git commit: QPID-8123: [System Tests] Minor test
related changes
Posted by or...@apache.org.
QPID-8123: [System Tests] Minor test related changes
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/58e38f31
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/58e38f31
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/58e38f31
Branch: refs/heads/master
Commit: 58e38f31214795e8cffa596979327b04b83de771
Parents: 59f78b0
Author: Alex Rudyy <or...@apache.org>
Authored: Thu Mar 15 17:14:15 2018 +0000
Committer: Alex Rudyy <or...@apache.org>
Committed: Thu Mar 15 17:14:15 2018 +0000
----------------------------------------------------------------------
.../berkeleydb/replication/GroupCreator.java | 7 ++-
.../berkeleydb/replication/MultiNodeTest.java | 4 +-
.../berkeleydb/replication/TwoNodeTest.java | 2 +-
.../apache/qpid/systests/ConnectionBuilder.java | 5 ++-
test-profiles/test-provider-1-0.properties | 39 -----------------
test-profiles/test-provider.properties | 45 --------------------
6 files changed, 9 insertions(+), 93 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/58e38f31/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/GroupCreator.java
----------------------------------------------------------------------
diff --git a/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/GroupCreator.java b/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/GroupCreator.java
index 8215e88..7750a0d 100644
--- a/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/GroupCreator.java
+++ b/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/GroupCreator.java
@@ -70,7 +70,6 @@ public class GroupCreator
private static final Logger LOGGER = LoggerFactory.getLogger(GroupCreator.class);
private static final int FAILOVER_CYCLECOUNT = 40;
- private static final int FAILOVER_RETRIES = 0;
private static final int FAILOVER_CONNECTDELAY = 1000;
private final QpidBrokerTestCase _testcase;
@@ -281,17 +280,17 @@ public class GroupCreator
public ConnectionBuilder getConnectionBuilderForAllClusterNodes() throws Exception
{
- return getConnectionBuilderForAllClusterNodes(FAILOVER_CONNECTDELAY, FAILOVER_RETRIES, FAILOVER_CYCLECOUNT);
+ return getConnectionBuilderForAllClusterNodes(FAILOVER_CONNECTDELAY, FAILOVER_CYCLECOUNT);
}
- public ConnectionBuilder getConnectionBuilderForAllClusterNodes(int connectDelay, int retries, final int cyclecount) throws Exception
+ public ConnectionBuilder getConnectionBuilderForAllClusterNodes(int connectDelay, final int cyclecount) throws Exception
{
final ConnectionBuilder connectionBuilder = _testcase.getConnectionBuilder();
connectionBuilder.setFailoverReconnectDelay(connectDelay);
connectionBuilder.setVirtualHost(_virtualHostName);
connectionBuilder.setFailover(true);
- final int reconnectAttempts = (retries == 0 ? 1 : retries) * (cyclecount == 0 ? 1 : cyclecount);
+ final int reconnectAttempts = cyclecount == 0 ? 1 : cyclecount;
connectionBuilder.setFailoverReconnectAttempts(reconnectAttempts);
final Iterator<Integer> iterator = _members.keySet().iterator();
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/58e38f31/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java
----------------------------------------------------------------------
diff --git a/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java b/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java
index 595d779..c964655 100644
--- a/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java
+++ b/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java
@@ -91,7 +91,7 @@ public class MultiNodeTest extends QpidBrokerTestCase
_groupCreator.configureClusterNodes();
_positiveFailoverBuilder = _groupCreator.getConnectionBuilderForAllClusterNodes();
- _negativeFailoverBuilder = _groupCreator.getConnectionBuilderForAllClusterNodes(200, 0, 2);
+ _negativeFailoverBuilder = _groupCreator.getConnectionBuilderForAllClusterNodes(200, 2);
_groupCreator.startCluster();
_failoverListener = new FailoverAwaitingListener();
@@ -488,7 +488,7 @@ public class MultiNodeTest extends QpidBrokerTestCase
ExecutorService executorService = Executors.newFixedThreadPool(connectionNumber + NUMBER_OF_NODES - 1);
try
{
- final ConnectionBuilder builder = _groupCreator.getConnectionBuilderForAllClusterNodes(100, 0, 100);
+ final ConnectionBuilder builder = _groupCreator.getConnectionBuilderForAllClusterNodes(100, 100);
final Connection consumerConnection = builder.build();
Session s = consumerConnection.createSession(true, Session.SESSION_TRANSACTED);
getJmsProvider().createQueue(s, getTestQueueName());
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/58e38f31/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/TwoNodeTest.java
----------------------------------------------------------------------
diff --git a/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/TwoNodeTest.java b/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/TwoNodeTest.java
index 385417f..3e0783d 100644
--- a/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/TwoNodeTest.java
+++ b/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/TwoNodeTest.java
@@ -67,7 +67,7 @@ public class TwoNodeTest extends QpidBrokerTestCase
_groupCreator.configureClusterNodes();
_groupCreator.setDesignatedPrimaryOnFirstBroker(designedPrimary);
_positiveFailoverBuilder = _groupCreator.getConnectionBuilderForAllClusterNodes();
- _negativeFailoverBuilder = _groupCreator.getConnectionBuilderForAllClusterNodes(200, 0, 2);
+ _negativeFailoverBuilder = _groupCreator.getConnectionBuilderForAllClusterNodes(200, 2);
_groupCreator.startCluster();
}
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/58e38f31/systests/qpid-systests-jms-core/src/main/java/org/apache/qpid/systests/ConnectionBuilder.java
----------------------------------------------------------------------
diff --git a/systests/qpid-systests-jms-core/src/main/java/org/apache/qpid/systests/ConnectionBuilder.java b/systests/qpid-systests-jms-core/src/main/java/org/apache/qpid/systests/ConnectionBuilder.java
index 34a7f62..2fa7b16 100644
--- a/systests/qpid-systests-jms-core/src/main/java/org/apache/qpid/systests/ConnectionBuilder.java
+++ b/systests/qpid-systests-jms-core/src/main/java/org/apache/qpid/systests/ConnectionBuilder.java
@@ -49,6 +49,8 @@ public interface ConnectionBuilder
ConnectionBuilder setFailoverReconnectDelay(int connectDelay);
ConnectionBuilder setTls(boolean enableTls);
ConnectionBuilder setSyncPublish(boolean syncPublish);
+
+ @Deprecated
ConnectionBuilder setOptions(Map<String, String> options);
ConnectionBuilder setPopulateJMSXUserID(boolean populateJMSXUserID);
ConnectionBuilder setMessageRedelivery(final boolean redelivery);
@@ -61,9 +63,8 @@ public interface ConnectionBuilder
ConnectionBuilder setVerifyHostName(boolean verifyHostName);
ConnectionBuilder setKeyAlias(String alias);
ConnectionBuilder setSaslMechanisms(String... mechanism);
-
ConnectionBuilder setCompress(boolean compress);
- Connection build() throws NamingException, JMSException;
+ Connection build() throws NamingException, JMSException;
ConnectionFactory buildConnectionFactory() throws NamingException;
}
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/58e38f31/test-profiles/test-provider-1-0.properties
----------------------------------------------------------------------
diff --git a/test-profiles/test-provider-1-0.properties b/test-profiles/test-provider-1-0.properties
deleted file mode 100644
index cb72574..0000000
--- a/test-profiles/test-provider-1-0.properties
+++ /dev/null
@@ -1,39 +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.
-#
-#
-
-# Copied from default.testprofile
-test.port=0
-test.port.ssl=0
-test.port.alt=0
-test.port.alt.ssl=0
-
-java.naming.factory.initial = org.apache.qpid.jms.jndi.JmsInitialContextFactory
-
-# The actual factory URIs are set in QpidBrokerTestCase
-connectionfactory.default=amqp://localhost:5672
-connectionfactory.failover=amqp://localhost:5672
-
-
-queue.MyQueue = example.MyQueue
-queue.queue = example.queue
-
-topic.topic = amq.topic/topic
-topic.durableSubscriberTopic = durableSubscriberTopic
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/58e38f31/test-profiles/test-provider.properties
----------------------------------------------------------------------
diff --git a/test-profiles/test-provider.properties b/test-profiles/test-provider.properties
deleted file mode 100644
index 83f6ded..0000000
--- a/test-profiles/test-provider.properties
+++ /dev/null
@@ -1,45 +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.
-#
-#
-
-# Copied from default.testprofile
-test.port=0
-test.port.ssl=0
-test.port.alt=0
-test.port.alt.ssl=0
-
-
-connectionfactory.default = amqp://username:password@clientid/test?brokerlist='tcp://localhost:${test.port}'
-connectionfactory.default.ssl = amqp://username:password@clientid/test?brokerlist='tcp://localhost:${test.port.ssl}?ssl='true''
-
-connectionfactory.failover = amqp://username:password@clientid/test?brokerlist='tcp://localhost:${test.port};tcp://localhost:${test.port.alt}'&sync_ack='true'&sync_publish='all'&failover='roundrobin?cyclecount='20''
-connectionfactory.failover.ssl = amqp://username:password@clientid/test?brokerlist='tcp://localhost:${test.port.ssl}?ssl='true';tcp://localhost:${test.port.alt.ssl}?ssl='true''&sync_ack='true'&sync_publish='all'&failover='roundrobin?cyclecount='20''
-
-connectionfactory.connection2 = amqp://username:password@clientid/test?brokerlist='tcp://localhost:${test.port.alt}'
-
-connectionfactory.management = amqp://username:password@clientid/$management?brokerlist='tcp://localhost:${test.port}'
-connectionfactory.management.ssl = amqp://username:password@clientid/$management?brokerlist='tcp://localhost:${test.port.ssl}?ssl='true''
-
-
-queue.MyQueue = example.MyQueue
-queue.queue = example.queue
-
-topic.topic = topic
-topic.durableSubscriberTopic = durableSubscriberTopic
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[3/3] qpid-broker-j git commit: NO-JIRA: Add CI status links and
project links into README.md
Posted by or...@apache.org.
NO-JIRA: Add CI status links and project links into README.md
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/1e01c1fb
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/1e01c1fb
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/1e01c1fb
Branch: refs/heads/master
Commit: 1e01c1fbe05e52d52d9fb01c7c1c6559470b2ff2
Parents: 58e38f3
Author: Alex Rudyy <or...@apache.org>
Authored: Thu Mar 15 18:04:48 2018 +0000
Committer: Alex Rudyy <or...@apache.org>
Committed: Thu Mar 15 18:07:26 2018 +0000
----------------------------------------------------------------------
README.md | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1e01c1fb/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 78e556a..6020d03 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,23 @@
# Apache Qpid Broker-J
+---
+
+|CI Process|Status|
+|---|---|
+|Travis CI Build|[![https://travis-ci.org/apache/qpid-broker-j.svg?branch=master](https://travis-ci.org/apache/qpid-broker-j.png?branch=master)](https://travis-ci.org/apache/qpid-broker-j?branch=master)|
+|Apache Jenkins CI Build|[![Status](https://builds.apache.org/buildStatus/icon?job=Qpid-Broker-J-TestMatrix)](https://builds.apache.org/view/M-R/view/Qpid/job/Qpid-Broker-J-TestMatrix/)|
+
+---
+
+[Website](http://qpid.apache.org/) |
+[Wiki](https://cwiki.apache.org/confluence/display/qpid) |
+[Documentation](http://qpid.apache.org/documentation.html) |
+[Developer Mailing List](mailto:dev@qpid.apache.org) |
+[User Mailing List](mailto:users@qpid.apache.org) |
+[Open Issues](https://issues.apache.org/jira/issues/?jql=project%20%3D%20QPID%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20Broker-J%20ORDER%20BY%20key%20DESC)
+
+# Qpid Broker-J
+
The Apache Qpid Broker-J is a powerful open-source message broker.
* Supports Advanced Message Queuing Protocol (AMQP) versions 0-8, 0-9, 0-91, 0-10 and 1.0
@@ -63,11 +81,7 @@ Execute the tests and produce code coverage report:
## Documentation
-Documentation (in docbook format) is found beneath the *doc* module. The documentation is available in a published
-form at:
-
-http://qpid.apache.org/documentation.html
-
+Documentation (in docbook format) is found beneath the *doc* module.
## Distribution assemblies
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org