Repository: qpid-broker-j Updated Branches: refs/heads/master b05d0caed -> 22877253b
QPID-7771: [Java Broker] Fix failing ExchangeRoutingTest on the 0-9 profile. 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/22877253 Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/22877253 Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/22877253 Branch: refs/heads/master Commit: 22877253be9c835834813122ed41e54fc197b97a Parents: b05d0ca Author: Alex Rudyy <oru...@apache.org> Authored: Wed Sep 13 10:29:25 2017 +0100 Committer: Alex Rudyy <oru...@apache.org> Committed: Wed Sep 13 10:31:06 2017 +0100 ---------------------------------------------------------------------- .../qpid/server/routing/ExchangeRoutingTest.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/22877253/systests/src/test/java/org/apache/qpid/server/routing/ExchangeRoutingTest.java ---------------------------------------------------------------------- diff --git a/systests/src/test/java/org/apache/qpid/server/routing/ExchangeRoutingTest.java b/systests/src/test/java/org/apache/qpid/server/routing/ExchangeRoutingTest.java index 0d29082..7370328 100644 --- a/systests/src/test/java/org/apache/qpid/server/routing/ExchangeRoutingTest.java +++ b/systests/src/test/java/org/apache/qpid/server/routing/ExchangeRoutingTest.java @@ -31,6 +31,7 @@ import javax.jms.Session; import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.qpid.jms.ConnectionURL; import org.apache.qpid.server.model.Binding; import org.apache.qpid.test.utils.QpidBrokerTestCase; @@ -55,12 +56,25 @@ public class ExchangeRoutingTest extends QpidBrokerTestCase _exchName1 = getTestQueueName() + "_exch1"; _exchName2 = getTestQueueName() + "_exch2"; - _connection = getConnection(); + _connection = createConnection(); _connection.start(); _session = _connection.createSession(true, Session.SESSION_TRANSACTED); createEntityUsingAmqpManagement(_queueName, _session, AMQP_MNG_QPID_QUEUE_STANDARD); + } + private Connection createConnection() throws Exception + { + if (isBrokerPre010()) + { + Map<String, String> options = new HashMap<>(); + options.put(ConnectionURL.OPTIONS_CLOSE_WHEN_NO_ROUTE, Boolean.toString(false)); + return getConnectionWithOptions(options); + } + else + { + return getConnection(); + } } public void testExchangeToQueueRouting() throws Exception --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org