diff options
| author | Robert Gemmell <robbie@apache.org> | 2012-05-29 22:50:35 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2012-05-29 22:50:35 +0000 |
| commit | 4e82caaece6d7b1626edc0b0913d45cad8771596 (patch) | |
| tree | a08c7faba239fcc8bd9ab73c9ccd9ca7a7ca02ce /qpid/java | |
| parent | 3f64f140c95f54adfd5d698765f01d04670a0af0 (diff) | |
| download | qpid-python-4e82caaece6d7b1626edc0b0913d45cad8771596.tar.gz | |
QPID-4029: add ability to selectively include a protocol version on a given port, overriding an exclusion on the same port or it being disabled on all ports.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1344040 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
39 files changed, 540 insertions, 62 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java index ac1fcf05db..2b43d41c7a 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java @@ -53,23 +53,15 @@ import java.io.InputStream; import java.net.InetAddress; import java.net.InetSocketAddress; import java.util.EnumSet; -import java.util.Formatter; import java.util.HashSet; import java.util.List; import java.util.Properties; import java.util.Set; -import java.util.logging.ConsoleHandler; -import java.util.logging.FileHandler; -import java.util.logging.Handler; -import java.util.logging.Level; -import java.util.logging.LogRecord; public class Broker { private static final Logger LOGGER = Logger.getLogger(Broker.class); - private static final int IPV4_ADDRESS_LENGTH = 4; - private static final char IPV4_LITERAL_SEPARATOR = '.'; private volatile Thread _shutdownHookThread; protected static class InitException extends RuntimeException @@ -165,36 +157,71 @@ public class Broker parsePortList(sslPorts, serverConfig.getSSLPorts()); } + //1-0 excludes and includes Set<Integer> exclude_1_0 = new HashSet<Integer>(options.getExcludedPorts(ProtocolExclusion.v1_0)); if(exclude_1_0.isEmpty()) { parsePortList(exclude_1_0, serverConfig.getPortExclude10()); } + Set<Integer> include_1_0 = new HashSet<Integer>(options.getIncludedPorts(ProtocolInclusion.v1_0)); + if(include_1_0.isEmpty()) + { + parsePortList(include_1_0, serverConfig.getPortInclude10()); + } + + //0-10 excludes and includes Set<Integer> exclude_0_10 = new HashSet<Integer>(options.getExcludedPorts(ProtocolExclusion.v0_10)); if(exclude_0_10.isEmpty()) { parsePortList(exclude_0_10, serverConfig.getPortExclude010()); } + Set<Integer> include_0_10 = new HashSet<Integer>(options.getIncludedPorts(ProtocolInclusion.v0_10)); + if(include_0_10.isEmpty()) + { + parsePortList(include_0_10, serverConfig.getPortInclude010()); + } + + //0-9-1 excludes and includes Set<Integer> exclude_0_9_1 = new HashSet<Integer>(options.getExcludedPorts(ProtocolExclusion.v0_9_1)); if(exclude_0_9_1.isEmpty()) { parsePortList(exclude_0_9_1, serverConfig.getPortExclude091()); } + Set<Integer> include_0_9_1 = new HashSet<Integer>(options.getIncludedPorts(ProtocolInclusion.v0_9_1)); + if(include_0_9_1.isEmpty()) + { + parsePortList(include_0_9_1, serverConfig.getPortInclude091()); + } + + //0-9 excludes and includes Set<Integer> exclude_0_9 = new HashSet<Integer>(options.getExcludedPorts(ProtocolExclusion.v0_9)); if(exclude_0_9.isEmpty()) { parsePortList(exclude_0_9, serverConfig.getPortExclude09()); } + Set<Integer> include_0_9 = new HashSet<Integer>(options.getIncludedPorts(ProtocolInclusion.v0_9)); + if(include_0_9.isEmpty()) + { + parsePortList(include_0_9, serverConfig.getPortInclude09()); + } + + //0-8 excludes and includes Set<Integer> exclude_0_8 = new HashSet<Integer>(options.getExcludedPorts(ProtocolExclusion.v0_8)); if(exclude_0_8.isEmpty()) { parsePortList(exclude_0_8, serverConfig.getPortExclude08()); } + Set<Integer> include_0_8 = new HashSet<Integer>(options.getIncludedPorts(ProtocolInclusion.v0_8)); + if(include_0_8.isEmpty()) + { + parsePortList(include_0_8, serverConfig.getPortInclude08()); + } + String bindAddr = options.getBind(); if (bindAddr == null) { @@ -220,8 +247,8 @@ public class Broker final InetSocketAddress inetSocketAddress = new InetSocketAddress(bindAddress, port); final Set<AmqpProtocolVersion> supported = - getSupportedVersions(port, exclude_1_0, exclude_0_10, exclude_0_9_1, exclude_0_9, - exclude_0_8, serverConfig); + getSupportedVersions(port, exclude_1_0, exclude_0_10, exclude_0_9_1, exclude_0_9, exclude_0_8, + include_1_0, include_0_10, include_0_9_1, include_0_9, include_0_8,serverConfig); final NetworkTransportConfiguration settings = new ServerNetworkTransportConfiguration(serverConfig, inetSocketAddress, Transport.TCP); @@ -251,8 +278,8 @@ public class Broker final InetSocketAddress inetSocketAddress = new InetSocketAddress(bindAddress, sslPort); final Set<AmqpProtocolVersion> supported = - getSupportedVersions(sslPort, exclude_1_0, exclude_0_10, exclude_0_9_1, - exclude_0_9, exclude_0_8, serverConfig); + getSupportedVersions(sslPort, exclude_1_0, exclude_0_10, exclude_0_9_1, exclude_0_9, exclude_0_8, + include_1_0, include_0_10, include_0_9_1, include_0_9, include_0_8, serverConfig); final NetworkTransportConfiguration settings = new ServerNetworkTransportConfiguration(serverConfig, inetSocketAddress, Transport.TCP); @@ -283,27 +310,36 @@ public class Broker final Set<Integer> exclude_0_9_1, final Set<Integer> exclude_0_9, final Set<Integer> exclude_0_8, + final Set<Integer> include_1_0, + final Set<Integer> include_0_10, + final Set<Integer> include_0_9_1, + final Set<Integer> include_0_9, + final Set<Integer> include_0_8, final ServerConfiguration serverConfig) { final EnumSet<AmqpProtocolVersion> supported = EnumSet.allOf(AmqpProtocolVersion.class); - if(exclude_1_0.contains(port) || !serverConfig.isAmqp10enabled()) + if((exclude_1_0.contains(port) || !serverConfig.isAmqp10enabled()) && !include_1_0.contains(port)) { supported.remove(AmqpProtocolVersion.v1_0_0); } - if(exclude_0_10.contains(port) || !serverConfig.isAmqp010enabled()) + + if((exclude_0_10.contains(port) || !serverConfig.isAmqp010enabled()) && !include_0_10.contains(port)) { supported.remove(AmqpProtocolVersion.v0_10); } - if(exclude_0_9_1.contains(port) || !serverConfig.isAmqp091enabled()) + + if((exclude_0_9_1.contains(port) || !serverConfig.isAmqp091enabled()) && !include_0_9_1.contains(port)) { supported.remove(AmqpProtocolVersion.v0_9_1); } - if(exclude_0_9.contains(port) || !serverConfig.isAmqp09enabled()) + + if((exclude_0_9.contains(port) || !serverConfig.isAmqp09enabled()) && !include_0_9.contains(port)) { supported.remove(AmqpProtocolVersion.v0_9); } - if(exclude_0_8.contains(port) || !serverConfig.isAmqp08enabled()) + + if((exclude_0_8.contains(port) || !serverConfig.isAmqp08enabled()) && !include_0_8.contains(port)) { supported.remove(AmqpProtocolVersion.v0_8); } diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java index d871c724fd..cec614881d 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java @@ -37,6 +37,7 @@ public class BrokerOptions private final Set<Integer> _ports = new HashSet<Integer>(); private final Set<Integer> _sslPorts = new HashSet<Integer>(); private final Map<ProtocolExclusion,Set<Integer>> _exclusionMap = new HashMap<ProtocolExclusion, Set<Integer>>(); + private final Map<ProtocolInclusion,Set<Integer>> _inclusionMap = new HashMap<ProtocolInclusion, Set<Integer>>(); private String _configFile; private String _logConfigFile; @@ -161,4 +162,21 @@ public class BrokerOptions { _bundleContext = bundleContext; } + + public Set<Integer> getIncludedPorts(final ProtocolInclusion includeProtocol) + { + final Set<Integer> includedPorts = _inclusionMap.get(includeProtocol); + return includedPorts == null ? Collections.<Integer>emptySet() : includedPorts; + } + + public void addIncludedPort(final ProtocolInclusion includeProtocol, final int port) + { + if (!_inclusionMap.containsKey(includeProtocol)) + { + _inclusionMap.put(includeProtocol, new HashSet<Integer>()); + } + + Set<Integer> ports = _inclusionMap.get(includeProtocol); + ports.add(port); + } }
\ No newline at end of file diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java index 70fa414e3c..9fe7a6619f 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java @@ -85,6 +85,32 @@ public class Main .withDescription("when listening on the specified port do not accept AMQP0-8 connections. The specified port must be one specified on the command line") .withLongOpt("exclude-0-8").create(); + private static final Option OPTION_INCLUDE_1_0 = + OptionBuilder.withArgName("port").hasArg() + .withDescription("accept AMQP1-0 connections on this port, overriding configuration to the contrary. The specified port must be one specified on the command line") + .withLongOpt("include-1-0").create(); + +private static final Option OPTION_INCLUDE_0_10 = + OptionBuilder.withArgName("port").hasArg() + .withDescription("accept AMQP0-10 connections on this port, overriding configuration to the contrary. The specified port must be one specified on the command line") + .withLongOpt("include-0-10").create(); + +private static final Option OPTION_INCLUDE_0_9_1 = + OptionBuilder.withArgName("port").hasArg() + .withDescription("accept AMQP0-9-1 connections on this port, overriding configuration to the contrary. The specified port must be one specified on the command line") + .withLongOpt("include-0-9-1").create(); + +private static final Option OPTION_INCLUDE_0_9 = + OptionBuilder.withArgName("port").hasArg() + .withDescription("accept AMQP0-9 connections on this port, overriding configuration to the contrary. The specified port must be one specified on the command line") + .withLongOpt("include-0-9").create(); + +private static final Option OPTION_INCLUDE_0_8 = + OptionBuilder.withArgName("port").hasArg() + .withDescription("accept AMQP0-8 connections on this port, overriding configuration to the contrary. The specified port must be one specified on the command line") + .withLongOpt("include-0-8").create(); + + private static final Option OPTION_JMX_PORT_REGISTRY_SERVER = OptionBuilder.withArgName("port").hasArg() .withDescription("listen on the specified management (registry server) port. Overrides any value in the config file") @@ -127,6 +153,11 @@ public class Main OPTIONS.addOption(OPTION_EXCLUDE_0_9_1); OPTIONS.addOption(OPTION_EXCLUDE_0_9); OPTIONS.addOption(OPTION_EXCLUDE_0_8); + OPTIONS.addOption(OPTION_INCLUDE_1_0); + OPTIONS.addOption(OPTION_INCLUDE_0_10); + OPTIONS.addOption(OPTION_INCLUDE_0_9_1); + OPTIONS.addOption(OPTION_INCLUDE_0_9); + OPTIONS.addOption(OPTION_INCLUDE_0_8); OPTIONS.addOption(OPTION_BIND); OPTIONS.addOption(OPTION_JMX_PORT_REGISTRY_SERVER); @@ -256,6 +287,10 @@ public class Main { parsePortArray(options, _commandLine.getOptionValues(pe.getExcludeName()), pe); } + for(ProtocolInclusion pe : ProtocolInclusion.values()) + { + parseProtocolInclusions(options, _commandLine.getOptionValues(pe.getIncludeName()), pe); + } } String[] sslPortStr = _commandLine.getOptionValues(OPTION_SSLPORT.getOpt()); @@ -266,6 +301,10 @@ public class Main { parsePortArray(options, _commandLine.getOptionValues(pe.getExcludeName()), pe); } + for(ProtocolInclusion pe : ProtocolInclusion.values()) + { + parseProtocolInclusions(options, _commandLine.getOptionValues(pe.getIncludeName()), pe); + } } setExceptionHandler(); @@ -399,4 +438,23 @@ public class Main } } } + + private static void parseProtocolInclusions(final BrokerOptions options, final Object[] ports, + final ProtocolInclusion includedProtocol) throws InitException + { + if(ports != null) + { + for(int i = 0; i < ports.length; i++) + { + try + { + options.addIncludedPort(includedProtocol, Integer.parseInt(String.valueOf(ports[i]))); + } + catch (NumberFormatException e) + { + throw new InitException("Invalid port for inclusion: " + ports[i], e); + } + } + } + } } diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/ProtocolInclusion.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/ProtocolInclusion.java new file mode 100644 index 0000000000..85fbe2e02e --- /dev/null +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/ProtocolInclusion.java @@ -0,0 +1,74 @@ +/* + * + * 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.server; + +import java.util.HashMap; +import java.util.Map; + +public enum ProtocolInclusion +{ + v0_8("include-0-8","--include-0-8"), + v0_9("include-0-9", "--include-0-9"), + v0_9_1("include-0-9-1", "--include-0-9-1"), + v0_10("include-0-10", "--include-0-10"), + v1_0("include-1-0", "--include-1-0"); + + private static final Map<String, ProtocolInclusion> MAP = new HashMap<String,ProtocolInclusion>(); + + static + { + for(ProtocolInclusion pe : ProtocolInclusion.values()) + { + MAP.put(pe.getArg(), pe); + } + } + + private String _arg; + private String _includeName; + + private ProtocolInclusion(final String includeName, final String arg) + { + _includeName = includeName; + _arg = arg; + } + + public String getArg() + { + return _arg; + } + + public String getIncludeName() + { + return _includeName; + } + + public static ProtocolInclusion lookup(final String arg) + { + ProtocolInclusion ex = MAP.get(arg); + + if(ex == null) + { + throw new IllegalArgumentException(arg + " is not a valid protocol inclusion"); + } + + return ex; + } +} diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java index baf6d5e6ad..651fd26059 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java @@ -94,6 +94,11 @@ public class ServerConfiguration extends ConfigurationPlugin public static final String CONNECTOR_AMQP09ENABLED = "connector.amqp09enabled"; public static final String CONNECTOR_AMQP08ENABLED = "connector.amqp08enabled"; public static final String CONNECTOR_AMQP_SUPPORTED_REPLY = "connector.amqpDefaultSupportedProtocolReply"; + public static final String CONNECTOR_INCLUDE_10 = "connector.include10"; + public static final String CONNECTOR_INCLUDE_010 = "connector.include010"; + public static final String CONNECTOR_INCLUDE_091 = "connector.include091"; + public static final String CONNECTOR_INCLUDE_09 = "connector.include09"; + public static final String CONNECTOR_INCLUDE_08 = "connector.include08"; { envVarMap.put("QPID_PORT", "connector.port"); @@ -714,6 +719,31 @@ public class ServerConfiguration extends ConfigurationPlugin return getListValue("connector.non08port"); } + public List getPortInclude08() + { + return getListValue(CONNECTOR_INCLUDE_08); + } + + public List getPortInclude09() + { + return getListValue(CONNECTOR_INCLUDE_09); + } + + public List getPortInclude091() + { + return getListValue(CONNECTOR_INCLUDE_091); + } + + public List getPortInclude010() + { + return getListValue(CONNECTOR_INCLUDE_010); + } + + public List getPortInclude10() + { + return getListValue(CONNECTOR_INCLUDE_10); + } + public String getBind() { return getStringValue("connector.bind", WILDCARD_ADDRESS); diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/BrokerOptionsTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/BrokerOptionsTest.java index bb20e0200b..43824e713f 100644 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/BrokerOptionsTest.java +++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/BrokerOptionsTest.java @@ -199,4 +199,31 @@ public class BrokerOptionsTest extends QpidTestCase _options.setLogWatchFrequency(myFreq); assertEquals(myFreq, _options.getLogWatchFrequency()); } + + public void testDefaultIncludesPortFor0_10() + { + assertEquals(Collections.EMPTY_SET, _options.getIncludedPorts(ProtocolInclusion.v0_10)); + } + + public void testOverriddenIncludesPortFor0_10() + { + _options.addIncludedPort(ProtocolInclusion.v0_10, TEST_PORT1); + assertEquals(Collections.singleton(TEST_PORT1), _options.getIncludedPorts(ProtocolInclusion.v0_10)); + } + + public void testManyOverriddenIncludedPortFor0_10() + { + _options.addIncludedPort(ProtocolInclusion.v0_10, TEST_PORT1); + _options.addIncludedPort(ProtocolInclusion.v0_10, TEST_PORT2); + final Set<Integer> expectedPorts = new HashSet<Integer>(Arrays.asList(new Integer[] {TEST_PORT1, TEST_PORT2})); + assertEquals(expectedPorts, _options.getIncludedPorts(ProtocolInclusion.v0_10)); + } + + public void testDuplicatedOverriddenIncludedPortFor0_10AreSilentlyIgnored() + { + _options.addIncludedPort(ProtocolInclusion.v0_10, TEST_PORT1); + _options.addIncludedPort(ProtocolInclusion.v0_10, TEST_PORT2); + final Set<Integer> expectedPorts = new HashSet<Integer>(Arrays.asList(new Integer[] {TEST_PORT1, TEST_PORT2})); + assertEquals(expectedPorts, _options.getIncludedPorts(ProtocolInclusion.v0_10)); + } } diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/MainTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/MainTest.java index 31d5028536..ffd607574e 100644 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/MainTest.java +++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/MainTest.java @@ -47,6 +47,11 @@ public class MainTest extends QpidTestCase { assertEquals(0, options.getExcludedPorts(pe).size()); } + + for(ProtocolInclusion pe : EnumSet.allOf(ProtocolInclusion.class)) + { + assertEquals(0, options.getIncludedPorts(pe).size()); + } } public void testPortOverriddenSingle() @@ -162,6 +167,20 @@ public class MainTest extends QpidTestCase assertTrue("Parsed command line didnt pick up help option", main.getCommandLine().hasOption("h")); } + public void testInclude010() + { + BrokerOptions options = startDummyMain("-p 5678 --include-0-10 5678"); + + assertTrue(options.getPorts().contains(5678)); + assertEquals(1, options.getPorts().size()); + assertTrue(options.getIncludedPorts(ProtocolInclusion.v0_10).contains(5678)); + assertEquals(1, options.getIncludedPorts(ProtocolInclusion.v0_10).size()); + assertEquals(0, options.getIncludedPorts(ProtocolInclusion.v0_9_1).size()); + assertEquals(0, options.getIncludedPorts(ProtocolInclusion.v0_9).size()); + assertEquals(0, options.getIncludedPorts(ProtocolInclusion.v0_8).size()); + assertEquals(0, options.getIncludedPorts(ProtocolInclusion.v1_0).size()); + } + private BrokerOptions startDummyMain(String commandLine) { return (new TestMain(commandLine.split("\\s"))).getOptions(); diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java index 4caefc2f18..958cb23da0 100644 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java +++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java @@ -25,6 +25,7 @@ import org.apache.commons.configuration.XMLConfiguration; import org.apache.qpid.framing.AMQShortString; import org.apache.qpid.server.exchange.Exchange; +import org.apache.qpid.server.protocol.AmqpProtocolVersion; import org.apache.qpid.server.registry.ApplicationRegistry; import org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry; import org.apache.qpid.server.util.TestApplicationRegistry; @@ -1588,6 +1589,99 @@ public class ServerConfigurationTest extends QpidTestCase assertEquals(false, _serverConfig.isAmqp08enabled()); } + public void testPortInclude08() throws ConfigurationException + { + // Check default + _serverConfig.initialise(); + assertEquals(true, _serverConfig.getPortInclude08().isEmpty()); + + // Check values we set + _config.addProperty(ServerConfiguration.CONNECTOR_INCLUDE_08, "1"); + _config.addProperty(ServerConfiguration.CONNECTOR_INCLUDE_08, "2"); + _serverConfig = new ServerConfiguration(_config); + _serverConfig.initialise(); + assertEquals(2, _serverConfig.getPortInclude08().size()); + assertTrue(_serverConfig.getPortInclude08().contains("1")); + assertTrue(_serverConfig.getPortInclude08().contains("2")); + } + + public void testPortInclude09() throws ConfigurationException + { + // Check default + _serverConfig.initialise(); + assertEquals(true, _serverConfig.getPortInclude09().isEmpty()); + + // Check values we set + _config.addProperty(ServerConfiguration.CONNECTOR_INCLUDE_09, "3"); + _config.addProperty(ServerConfiguration.CONNECTOR_INCLUDE_09, "4"); + _serverConfig = new ServerConfiguration(_config); + _serverConfig.initialise(); + assertEquals(2, _serverConfig.getPortInclude09().size()); + assertTrue(_serverConfig.getPortInclude09().contains("3")); + assertTrue(_serverConfig.getPortInclude09().contains("4")); + } + + public void testPortInclude091() throws ConfigurationException + { + // Check default + _serverConfig.initialise(); + assertEquals(true, _serverConfig.getPortInclude091().isEmpty()); + + // Check values we set + _config.addProperty(ServerConfiguration.CONNECTOR_INCLUDE_091, "5"); + _config.addProperty(ServerConfiguration.CONNECTOR_INCLUDE_091, "6"); + _serverConfig = new ServerConfiguration(_config); + _serverConfig.initialise(); + assertEquals(2, _serverConfig.getPortInclude091().size()); + assertTrue(_serverConfig.getPortInclude091().contains("5")); + assertTrue(_serverConfig.getPortInclude091().contains("6")); + } + + public void testPortInclude010() throws ConfigurationException + { + // Check default + _serverConfig.initialise(); + assertEquals(true, _serverConfig.getPortInclude010().isEmpty()); + + // Check values we set + _config.addProperty(ServerConfiguration.CONNECTOR_INCLUDE_010, "7"); + _config.addProperty(ServerConfiguration.CONNECTOR_INCLUDE_010, "8"); + _serverConfig = new ServerConfiguration(_config); + _serverConfig.initialise(); + assertEquals(2, _serverConfig.getPortInclude010().size()); + assertTrue(_serverConfig.getPortInclude010().contains("7")); + assertTrue(_serverConfig.getPortInclude010().contains("8")); + } + + public void testPortInclude10() throws ConfigurationException + { + // Check default + _serverConfig.initialise(); + assertEquals(true, _serverConfig.getPortInclude10().isEmpty()); + + // Check values we set + _config.addProperty(ServerConfiguration.CONNECTOR_INCLUDE_10, "9"); + _config.addProperty(ServerConfiguration.CONNECTOR_INCLUDE_10, "10"); + _serverConfig = new ServerConfiguration(_config); + _serverConfig.initialise(); + assertEquals(2, _serverConfig.getPortInclude10().size()); + assertTrue(_serverConfig.getPortInclude10().contains("9")); + assertTrue(_serverConfig.getPortInclude10().contains("10")); + } + + public void testGetDefaultSupportedProtocolReply() throws Exception + { + // Check default + _serverConfig.initialise(); + assertNull("unexpected default value", _serverConfig.getDefaultSupportedProtocolReply()); + + // Check values we set + _config.addProperty(ServerConfiguration.CONNECTOR_AMQP_SUPPORTED_REPLY, "v0_10"); + _serverConfig = new ServerConfiguration(_config); + _serverConfig.initialise(); + assertEquals(AmqpProtocolVersion.v0_10, _serverConfig.getDefaultSupportedProtocolReply()); + } + /** * Convenience method to output required security preamble for broker config */ diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java index 0e3a658e32..e8d72c13bd 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java @@ -38,6 +38,13 @@ public class SupportedProtocolVersionsTest extends QpidBrokerTestCase // No-op, we call super.setUp() from test methods after appropriate config overrides } + private void clearProtocolSupportManipulations() + { + //Remove the QBTC provided protocol manipulations, giving only the protocols which default to enabled + setTestSystemProperty(QpidBrokerTestCase.BROKER_PROTOCOL_EXCLUDES, null); + setTestSystemProperty(QpidBrokerTestCase.BROKER_PROTOCOL_INCLUDES, null); + } + /** * Test that 0-10, 0-9-1, 0-9, and 0-8 support is present when no * attempt has yet been made to disable them, and forcing the client @@ -46,7 +53,8 @@ public class SupportedProtocolVersionsTest extends QpidBrokerTestCase */ public void testDefaultProtocolSupport() throws Exception { - //Start the broker without modifying its supported protocols + clearProtocolSupportManipulations(); + super.setUp(); //Verify requesting a 0-10 connection works @@ -74,11 +82,13 @@ public class SupportedProtocolVersionsTest extends QpidBrokerTestCase connection.close(); } - public void testDisabling010() throws Exception + public void testDisabling010and10() throws Exception { - //disable 0-10 support - setConfigurationProperty("connector.amqp10enabled", "false"); - setConfigurationProperty("connector.amqp010enabled", "false"); + clearProtocolSupportManipulations(); + + //disable 0-10 and 1-0 support + setConfigurationProperty(ServerConfiguration.CONNECTOR_AMQP010ENABLED, "false"); + setConfigurationProperty(ServerConfiguration.CONNECTOR_AMQP10ENABLED, "false"); super.setUp(); @@ -90,9 +100,11 @@ public class SupportedProtocolVersionsTest extends QpidBrokerTestCase connection.close(); } - public void testDisabling091and010() throws Exception + public void testDisabling091and010and10() throws Exception { - //disable 0-91 and 0-10 support + clearProtocolSupportManipulations(); + + //disable 0-91 and 0-10 and 1-0 support setConfigurationProperty(ServerConfiguration.CONNECTOR_AMQP10ENABLED, "false"); setConfigurationProperty(ServerConfiguration.CONNECTOR_AMQP010ENABLED, "false"); setConfigurationProperty(ServerConfiguration.CONNECTOR_AMQP091ENABLED, "false"); @@ -107,9 +119,11 @@ public class SupportedProtocolVersionsTest extends QpidBrokerTestCase connection.close(); } - public void testDisabling09and091and010() throws Exception + public void testDisabling09and091and010and10() throws Exception { - //disable 0-9, 0-91 and 0-10 support + clearProtocolSupportManipulations(); + + //disable 0-9, 0-91, 0-10 and 1-0 support setConfigurationProperty(ServerConfiguration.CONNECTOR_AMQP09ENABLED, "false"); setConfigurationProperty(ServerConfiguration.CONNECTOR_AMQP091ENABLED, "false"); setConfigurationProperty(ServerConfiguration.CONNECTOR_AMQP010ENABLED, "false"); @@ -127,6 +141,8 @@ public class SupportedProtocolVersionsTest extends QpidBrokerTestCase public void testConfiguringReplyingToUnsupported010ProtocolInitiationWith09insteadOf091() throws Exception { + clearProtocolSupportManipulations(); + //disable 0-10 support, and set the default unsupported protocol initiation reply to 0-9 setConfigurationProperty(ServerConfiguration.CONNECTOR_AMQP010ENABLED, "false"); setConfigurationProperty(ServerConfiguration.CONNECTOR_AMQP_SUPPORTED_REPLY, "v0_9"); @@ -147,4 +163,72 @@ public class SupportedProtocolVersionsTest extends QpidBrokerTestCase assertEquals("Unexpected protocol version in use", ProtocolVersion.v0_91, connection.getProtocolVersion()); connection.close(); } + + public void testProtocolInclusionThroughQBTCSystemPropertiesOverridesProtocolExclusion() throws Exception + { + testProtocolInclusionOverridesProtocolExclusion(false); + } + + public void testProtocolInclusionThroughConfigOverridesProtocolExclusion() throws Exception + { + testProtocolInclusionOverridesProtocolExclusion(true); + } + + private void testProtocolInclusionOverridesProtocolExclusion(boolean useConfig) throws Exception + { + clearProtocolSupportManipulations(); + + //selectively exclude 0-10 and 1-0 on the test port + setTestSystemProperty(QpidBrokerTestCase.BROKER_PROTOCOL_EXCLUDES,"--exclude-0-10 @PORT --exclude-1-0 @PORT"); + + super.setUp(); + + //Verify initially requesting a 0-10 connection negotiates a 0-9-1 connection + setTestClientSystemProperty(ClientProperties.AMQP_VERSION, "0-10"); + AMQConnection connection = (AMQConnection) getConnection(); + assertEquals("Unexpected protocol version in use", ProtocolVersion.v0_91, connection.getProtocolVersion()); + connection.close(); + + stopBroker(); + + if(useConfig) + { + //selectively include 0-10 support again on the test port through config + setConfigurationProperty(ServerConfiguration.CONNECTOR_INCLUDE_010, String.valueOf(getPort())); + } + else + { + //selectively include 0-10 support again on the test port through QBTC sys props + setTestSystemProperty(QpidBrokerTestCase.BROKER_PROTOCOL_INCLUDES,"--include-0-10 @PORT"); + } + + startBroker(); + + //Verify requesting a 0-10 connection now returns one + setTestClientSystemProperty(ClientProperties.AMQP_VERSION, "0-10"); + connection = (AMQConnection) getConnection(); + assertEquals("Unexpected protocol version in use", ProtocolVersion.v0_10, connection.getProtocolVersion()); + connection.close(); + } + + public void testProtocolInclusionOverridesProtocolDisabling() throws Exception + { + clearProtocolSupportManipulations(); + + //disable 0-10 and 1-0 + setConfigurationProperty(ServerConfiguration.CONNECTOR_AMQP010ENABLED, "false"); + setConfigurationProperty(ServerConfiguration.CONNECTOR_AMQP10ENABLED, "false"); + + //selectively include 0-10 support again on the test port + setConfigurationProperty(ServerConfiguration.CONNECTOR_INCLUDE_010, String.valueOf(getPort())); + + super.setUp(); + + //Verify initially requesting a 0-10 connection still works + setTestClientSystemProperty(ClientProperties.AMQP_VERSION, "0-10"); + AMQConnection connection = (AMQConnection) getConnection(); + assertEquals("Unexpected protocol version in use", ProtocolVersion.v0_10, connection.getProtocolVersion()); + connection.close(); + } + }
\ No newline at end of file diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java index 9f019443f5..238d3d5229 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java @@ -61,6 +61,7 @@ import org.apache.qpid.management.common.mbeans.ConfigurationManagement; import org.apache.qpid.server.Broker; import org.apache.qpid.server.BrokerOptions; import org.apache.qpid.server.ProtocolExclusion; +import org.apache.qpid.server.ProtocolInclusion; import org.apache.qpid.server.configuration.ServerConfiguration; import org.apache.qpid.server.protocol.AmqpProtocolVersion; import org.apache.qpid.server.store.MessageStoreConstants; @@ -123,7 +124,8 @@ public class QpidBrokerTestCase extends QpidTestCase private static final String BROKER_LOG_INTERLEAVE = "broker.log.interleave"; private static final String BROKER_LOG_PREFIX = "broker.log.prefix"; private static final String BROKER_PERSITENT = "broker.persistent"; - private static final String BROKER_PROTOCOL_EXCLUDES = "broker.protocol.excludes"; + public static final String BROKER_PROTOCOL_EXCLUDES = "broker.protocol.excludes"; + public static final String BROKER_PROTOCOL_INCLUDES = "broker.protocol.includes"; // values protected static final String JAVA = "java"; @@ -144,7 +146,6 @@ public class QpidBrokerTestCase extends QpidTestCase private final AmqpProtocolVersion _brokerVersion = AmqpProtocolVersion.valueOf(System.getProperty(BROKER_VERSION, "")); protected String _output = System.getProperty(TEST_OUTPUT, System.getProperty("java.io.tmpdir")); protected Boolean _brokerPersistent = Boolean.getBoolean(BROKER_PERSITENT); - private String _brokerProtocolExcludes = System.getProperty(BROKER_PROTOCOL_EXCLUDES); protected static String _brokerLogPrefix = System.getProperty(BROKER_LOG_PREFIX,"BROKER: "); protected static boolean _interleaveBrokerLog = Boolean.getBoolean(BROKER_LOG_INTERLEAVE); @@ -332,12 +333,15 @@ public class QpidBrokerTestCase extends QpidTestCase { final int sslPort = port-1; final String protocolExcludesList = getProtocolExcludesList(port, sslPort); + final String protocolIncludesList = getProtocolIncludesList(port, sslPort); + return _brokerCommand .replace("@PORT", "" + port) .replace("@SSL_PORT", "" + sslPort) .replace("@MPORT", "" + getManagementPort(port)) .replace("@CONFIG_FILE", _configFile.toString()) - .replace("@EXCLUDES", protocolExcludesList); + .replace("@EXCLUDES", protocolExcludesList) + .replace("@INCLUDES", protocolIncludesList); } public void startBroker() throws Exception @@ -377,6 +381,7 @@ public class QpidBrokerTestCase extends QpidTestCase options.addPort(port); addExcludedPorts(port, DEFAULT_SSL_PORT, options); + addIncludedPorts(port, DEFAULT_SSL_PORT, options); options.setJmxPortRegistryServer(getManagementPort(port)); @@ -525,9 +530,36 @@ public class QpidBrokerTestCase extends QpidTestCase protected String getProtocolExcludesList(int port, int sslPort) { - final String protocolExcludesList = - _brokerProtocolExcludes.replace("@PORT", "" + port).replace("@SSL_PORT", "" + sslPort); - return protocolExcludesList; + return System.getProperty(BROKER_PROTOCOL_EXCLUDES,"").replace("@PORT", "" + port).replace("@SSL_PORT", "" + sslPort); + } + + private String getProtocolIncludesList(int port, int sslPort) + { + return System.getProperty(BROKER_PROTOCOL_INCLUDES, "").replace("@PORT", "" + port).replace("@SSL_PORT", "" + sslPort); + } + + private void addIncludedPorts(int port, int sslPort, BrokerOptions options) + { + final String protocolIncludesList = getProtocolIncludesList(port, sslPort); + + if (protocolIncludesList.equals("")) + { + return; + } + final String[] toks = protocolIncludesList.split("\\s"); + + if(toks.length % 2 != 0) + { + throw new IllegalArgumentException("Must be an even number of tokens in '" + protocolIncludesList + "'"); + } + for (int i = 0; i < toks.length; i=i+2) + { + String includeArg = toks[i]; + final int includedPort = Integer.parseInt(toks[i+1]); + options.addIncludedPort(ProtocolInclusion.lookup(includeArg), includedPort); + + _logger.info("Adding protocol inclusion " + includeArg + " " + includedPort); + } } private boolean existingInternalBroker() diff --git a/qpid/java/test-profiles/JavaPre010Excludes b/qpid/java/test-profiles/JavaPre010Excludes index 0546ce92d3..363804abcb 100644 --- a/qpid/java/test-profiles/JavaPre010Excludes +++ b/qpid/java/test-profiles/JavaPre010Excludes @@ -24,7 +24,6 @@ // 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 org.apache.qpid.server.message.MessageProtocolConversionTest#* -org.apache.qpid.server.SupportedProtocolVersionsTest#* // The new addressing based syntax is not supported for AMQP 0-8/0-9 versions org.apache.qpid.client.failover.AddressBasedFailoverBehaviourTest#* diff --git a/qpid/java/test-profiles/java-bdb-spawn.0-10.testprofile b/qpid/java/test-profiles/java-bdb-spawn.0-10.testprofile index cba348b67f..5795f11da9 100644 --- a/qpid/java/test-profiles/java-bdb-spawn.0-10.testprofile +++ b/qpid/java/test-profiles/java-bdb-spawn.0-10.testprofile @@ -19,9 +19,10 @@ broker.language=java broker.type=spawned -broker.command=build/bin/qpid-server -p @PORT -m @MPORT -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception +broker.protocol.excludes=--exclude-1-0 @PORT --exclude-1-0 @SSL_PORT broker.config=build/etc/config-systests-bdb.xml messagestore.class.name=org.apache.qpid.server.store.berkeleydb.BDBMessageStore profile.excludes=JavaExcludes JavaPersistentExcludes Java010Excludes JavaBDBExcludes diff --git a/qpid/java/test-profiles/java-bdb-spawn.0-8.testprofile b/qpid/java/test-profiles/java-bdb-spawn.0-8.testprofile index 6e21a35425..853f1b8cc0 100644 --- a/qpid/java/test-profiles/java-bdb-spawn.0-8.testprofile +++ b/qpid/java/test-profiles/java-bdb-spawn.0-8.testprofile @@ -19,7 +19,7 @@ broker.language=java broker.type=spawned -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-bdb.xml diff --git a/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile b/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile index 491775d452..6c7dc37f7f 100644 --- a/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile +++ b/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile @@ -19,7 +19,7 @@ broker.language=java broker.type=spawned -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-bdb.xml diff --git a/qpid/java/test-profiles/java-bdb-spawn.0-9.testprofile b/qpid/java/test-profiles/java-bdb-spawn.0-9.testprofile index 6e4c6cbd13..7d7c9b085b 100644 --- a/qpid/java/test-profiles/java-bdb-spawn.0-9.testprofile +++ b/qpid/java/test-profiles/java-bdb-spawn.0-9.testprofile @@ -19,7 +19,7 @@ broker.language=java broker.type=spawned -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-bdb.xml diff --git a/qpid/java/test-profiles/java-bdb.0-10.testprofile b/qpid/java/test-profiles/java-bdb.0-10.testprofile index 3ef93a68cb..ac90050a3a 100644 --- a/qpid/java/test-profiles/java-bdb.0-10.testprofile +++ b/qpid/java/test-profiles/java-bdb.0-10.testprofile @@ -20,9 +20,10 @@ broker.language=java broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception +broker.protocol.excludes=--exclude-1-0 @PORT --exclude-1-0 @SSL_PORT broker.config=build/etc/config-systests-bdb.xml messagestore.class.name=org.apache.qpid.server.store.berkeleydb.BDBMessageStore profile.excludes=JavaExcludes JavaPersistentExcludes Java010Excludes JavaBDBExcludes diff --git a/qpid/java/test-profiles/java-bdb.0-8.testprofile b/qpid/java/test-profiles/java-bdb.0-8.testprofile index b20a5b39a7..41dba2910a 100644 --- a/qpid/java/test-profiles/java-bdb.0-8.testprofile +++ b/qpid/java/test-profiles/java-bdb.0-8.testprofile @@ -1,4 +1,4 @@ -# +: # 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 @@ -20,7 +20,7 @@ broker.language=java broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-bdb.xml diff --git a/qpid/java/test-profiles/java-bdb.0-9-1.testprofile b/qpid/java/test-profiles/java-bdb.0-9-1.testprofile index 111d8f7867..49dd6db0e0 100644 --- a/qpid/java/test-profiles/java-bdb.0-9-1.testprofile +++ b/qpid/java/test-profiles/java-bdb.0-9-1.testprofile @@ -20,7 +20,7 @@ broker.language=java broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-bdb.xml diff --git a/qpid/java/test-profiles/java-bdb.0-9.testprofile b/qpid/java/test-profiles/java-bdb.0-9.testprofile index 9524f59f02..76bda49808 100644 --- a/qpid/java/test-profiles/java-bdb.0-9.testprofile +++ b/qpid/java/test-profiles/java-bdb.0-9.testprofile @@ -20,7 +20,7 @@ broker.language=java broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-bdb.xml diff --git a/qpid/java/test-profiles/java-dby-mem.0-10.testprofile b/qpid/java/test-profiles/java-dby-mem.0-10.testprofile index 05ba6d8829..a1452b4986 100644 --- a/qpid/java/test-profiles/java-dby-mem.0-10.testprofile +++ b/qpid/java/test-profiles/java-dby-mem.0-10.testprofile @@ -20,9 +20,10 @@ broker.language=java broker.version=v0_10 broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception +broker.protocol.excludes=--exclude-1-0 @PORT --exclude-1-0 @SSL_PORT broker.config=build/etc/config-systests-derby-mem.xml messagestorefactory.class.name=org.apache.qpid.server.store.derby.DerbyMessageStoreFactory profile.excludes=JavaPersistentExcludes JavaDerbyExcludes Java010Excludes diff --git a/qpid/java/test-profiles/java-dby-mem.0-8.testprofile b/qpid/java/test-profiles/java-dby-mem.0-8.testprofile index fbfd41bfc9..9b6b413e81 100644 --- a/qpid/java/test-profiles/java-dby-mem.0-8.testprofile +++ b/qpid/java/test-profiles/java-dby-mem.0-8.testprofile @@ -20,7 +20,7 @@ broker.version=v0_8 broker.language=java broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-derby-mem.xml diff --git a/qpid/java/test-profiles/java-dby-mem.0-9-1.testprofile b/qpid/java/test-profiles/java-dby-mem.0-9-1.testprofile index 6152b4c929..36bcfc4c1d 100644 --- a/qpid/java/test-profiles/java-dby-mem.0-9-1.testprofile +++ b/qpid/java/test-profiles/java-dby-mem.0-9-1.testprofile @@ -20,7 +20,7 @@ broker.version=v0_9_1 broker.language=java broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-derby-mem.xml diff --git a/qpid/java/test-profiles/java-dby-mem.0-9.testprofile b/qpid/java/test-profiles/java-dby-mem.0-9.testprofile index e0e77b2804..cfc7ad203f 100644 --- a/qpid/java/test-profiles/java-dby-mem.0-9.testprofile +++ b/qpid/java/test-profiles/java-dby-mem.0-9.testprofile @@ -20,7 +20,7 @@ broker.version=v0_9 broker.language=java broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-derby-mem.xml diff --git a/qpid/java/test-profiles/java-dby-spawn.0-10.testprofile b/qpid/java/test-profiles/java-dby-spawn.0-10.testprofile index 906ea271e6..5a8594599b 100644 --- a/qpid/java/test-profiles/java-dby-spawn.0-10.testprofile +++ b/qpid/java/test-profiles/java-dby-spawn.0-10.testprofile @@ -19,9 +19,10 @@ broker.language=java broker.version=v0_10 broker.type=spawned -broker.command=build/bin/qpid-server -p @PORT -m @MPORT -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception +broker.protocol.excludes=--exclude-1-0 @PORT --exclude-1-0 @SSL_PORT broker.config=build/etc/config-systests-derby.xml messagestore.class.name=org.apache.qpid.server.store.derby.DerbyMessageStore profile.excludes=JavaPersistentExcludes JavaDerbyExcludes Java010Excludes diff --git a/qpid/java/test-profiles/java-dby-spawn.0-8.testprofile b/qpid/java/test-profiles/java-dby-spawn.0-8.testprofile index 11670154a8..2febd51e1c 100644 --- a/qpid/java/test-profiles/java-dby-spawn.0-8.testprofile +++ b/qpid/java/test-profiles/java-dby-spawn.0-8.testprofile @@ -19,7 +19,7 @@ broker.version=v0_8 broker.language=java broker.type=spawned -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-derby.xml diff --git a/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile b/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile index 7d60916ab5..133796becd 100644 --- a/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile +++ b/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile @@ -19,7 +19,7 @@ broker.version=v0_9_1 broker.language=java broker.type=spawned -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-derby.xml diff --git a/qpid/java/test-profiles/java-dby-spawn.0-9.testprofile b/qpid/java/test-profiles/java-dby-spawn.0-9.testprofile index 4eab65eab0..5bafa83221 100644 --- a/qpid/java/test-profiles/java-dby-spawn.0-9.testprofile +++ b/qpid/java/test-profiles/java-dby-spawn.0-9.testprofile @@ -19,7 +19,7 @@ broker.version=v0_9 broker.language=java broker.type=spawned -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-derby.xml diff --git a/qpid/java/test-profiles/java-dby.0-10.testprofile b/qpid/java/test-profiles/java-dby.0-10.testprofile index 9bc6caf8a5..8d1ab9b015 100644 --- a/qpid/java/test-profiles/java-dby.0-10.testprofile +++ b/qpid/java/test-profiles/java-dby.0-10.testprofile @@ -20,9 +20,10 @@ broker.language=java broker.version=v0_10 broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception +broker.protocol.excludes=--exclude-1-0 @PORT --exclude-1-0 @SSL_PORT broker.config=build/etc/config-systests-derby.xml messagestore.class.name=org.apache.qpid.server.store.derby.DerbyMessageStore profile.excludes=JavaPersistentExcludes JavaDerbyExcludes Java010Excludes diff --git a/qpid/java/test-profiles/java-dby.0-8.testprofile b/qpid/java/test-profiles/java-dby.0-8.testprofile index 8a0a57c202..ccb355842a 100644 --- a/qpid/java/test-profiles/java-dby.0-8.testprofile +++ b/qpid/java/test-profiles/java-dby.0-8.testprofile @@ -20,7 +20,7 @@ broker.version=v0_8 broker.language=java broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-derby.xml diff --git a/qpid/java/test-profiles/java-dby.0-9-1.testprofile b/qpid/java/test-profiles/java-dby.0-9-1.testprofile index 1208949805..9e822deba5 100644 --- a/qpid/java/test-profiles/java-dby.0-9-1.testprofile +++ b/qpid/java/test-profiles/java-dby.0-9-1.testprofile @@ -20,7 +20,7 @@ broker.version=v0_9_1 broker.language=java broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-derby.xml diff --git a/qpid/java/test-profiles/java-dby.0-9.testprofile b/qpid/java/test-profiles/java-dby.0-9.testprofile index 9cf1347c4d..3926618f42 100644 --- a/qpid/java/test-profiles/java-dby.0-9.testprofile +++ b/qpid/java/test-profiles/java-dby.0-9.testprofile @@ -20,7 +20,7 @@ broker.version=v0_9 broker.language=java broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.config=build/etc/config-systests-derby.xml diff --git a/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile b/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile index 5e5d2e8a6b..2978fe6882 100644 --- a/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile +++ b/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile @@ -19,9 +19,10 @@ broker.version=v0_10 broker.language=java broker.type=spawned -broker.command=build/bin/qpid-server -p @PORT -m @MPORT -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception +broker.protocol.excludes=--exclude-1-0 @PORT --exclude-1-0 @SSL_PORT # # Do not enable. Allow client to attempt 0-10 and negotiate downwards # diff --git a/qpid/java/test-profiles/java-mms-spawn.0-8.testprofile b/qpid/java/test-profiles/java-mms-spawn.0-8.testprofile index 1b6b6f28a3..9d3e78fb11 100644 --- a/qpid/java/test-profiles/java-mms-spawn.0-8.testprofile +++ b/qpid/java/test-profiles/java-mms-spawn.0-8.testprofile @@ -19,7 +19,7 @@ broker.version=v0_8 broker.language=java broker.type=spawned -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.protocol.excludes=--exclude-0-10 @PORT --exclude-0-10 @SSL_PORT --exclude-1-0 @PORT --exclude-1-0 @SSL_PORT --exclude-0-9-1 @PORT --exclude-0-9-1 @SSL_PORT --exclude-0-9 @PORT --exclude-0-9 @SSL_PORT diff --git a/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile b/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile index e87ae2b204..54d845f391 100644 --- a/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile +++ b/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile @@ -19,7 +19,7 @@ broker.version=v0_9_1 broker.language=java broker.type=spawned -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.protocol.excludes=--exclude-0-10 @PORT --exclude-0-10 @SSL_PORT --exclude-1-0 @PORT --exclude-1-0 @SSL_PORT diff --git a/qpid/java/test-profiles/java-mms-spawn.0-9.testprofile b/qpid/java/test-profiles/java-mms-spawn.0-9.testprofile index 2a9430242e..6f76b699fa 100644 --- a/qpid/java/test-profiles/java-mms-spawn.0-9.testprofile +++ b/qpid/java/test-profiles/java-mms-spawn.0-9.testprofile @@ -19,7 +19,7 @@ broker.version=v0_9 broker.language=java broker.type=spawned -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.protocol.excludes=--exclude-0-10 @PORT --exclude-0-10 @SSL_PORT --exclude-1-0 @PORT --exclude-1-0 @SSL_PORT --exclude-0-9-1 @PORT --exclude-0-9-1 @SSL_PORT diff --git a/qpid/java/test-profiles/java-mms.0-10.testprofile b/qpid/java/test-profiles/java-mms.0-10.testprofile index 209d384422..d286450660 100644 --- a/qpid/java/test-profiles/java-mms.0-10.testprofile +++ b/qpid/java/test-profiles/java-mms.0-10.testprofile @@ -20,8 +20,9 @@ broker.language=java broker.version=v0_10 broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception +broker.protocol.excludes=--exclude-1-0 @PORT --exclude-1-0 @SSL_PORT profile.excludes=JavaTransientExcludes Java010Excludes diff --git a/qpid/java/test-profiles/java-mms.0-8.testprofile b/qpid/java/test-profiles/java-mms.0-8.testprofile index 1f02a49b28..5a425740fb 100644 --- a/qpid/java/test-profiles/java-mms.0-8.testprofile +++ b/qpid/java/test-profiles/java-mms.0-8.testprofile @@ -20,7 +20,7 @@ broker.language=java broker.version=v0_8 broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.protocol.excludes=--exclude-0-10 @PORT --exclude-0-10 @SSL_PORT --exclude-1-0 @PORT --exclude-1-0 @SSL_PORT --exclude-0-9-1 @PORT --exclude-0-9-1 @SSL_PORT --exclude-0-9 @PORT --exclude-0-9 @SSL_PORT diff --git a/qpid/java/test-profiles/java-mms.0-9-1.testprofile b/qpid/java/test-profiles/java-mms.0-9-1.testprofile index ae707f025d..007529ddc8 100644 --- a/qpid/java/test-profiles/java-mms.0-9-1.testprofile +++ b/qpid/java/test-profiles/java-mms.0-9-1.testprofile @@ -20,7 +20,7 @@ broker.language=java broker.version=v0_9_1 broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.protocol.excludes=--exclude-0-10 @PORT --exclude-0-10 @SSL_PORT --exclude-1-0 @PORT --exclude-1-0 @SSL_PORT diff --git a/qpid/java/test-profiles/java-mms.0-9.testprofile b/qpid/java/test-profiles/java-mms.0-9.testprofile index 8f372299ea..3f70be7639 100644 --- a/qpid/java/test-profiles/java-mms.0-9.testprofile +++ b/qpid/java/test-profiles/java-mms.0-9.testprofile @@ -20,7 +20,7 @@ broker.language=java broker.version=v0_9 broker.type=internal #broker.command only used for the second broker during failover tests in this profile -broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml +broker.command=build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDES @INCLUDES -c @CONFIG_FILE -l test-profiles/log4j-test.xml broker.ready=BRK-1004 broker.stopped=Exception broker.protocol.excludes=--exclude-0-10 @PORT --exclude-0-10 @SSL_PORT --exclude-1-0 @PORT --exclude-1-0 @SSL_PORT --exclude-0-9-1 @PORT --exclude-0-9-1 @SSL_PORT |
