summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Donald Kennedy <grkvlt@apache.org>2011-03-03 01:41:18 +0000
committerAndrew Donald Kennedy <grkvlt@apache.org>2011-03-03 01:41:18 +0000
commitffb25827f64be630818220eb267f95d38af75ca7 (patch)
treebe177580792e47414c76975a39a3d3f348f646c0
parent00a134e564a1b4ebdfb0f8ce675d030bbd052ccf (diff)
downloadqpid-python-ffb25827f64be630818220eb267f95d38af75ca7.tar.gz
NO-JIRA: Update version and broker constants for tests
Setup more version constants in QpidBrokerTestCase and update test-profiles to explicitly set versions. Creates 0-8 and 0-10 version profiles, and sets the default protocol version to be 0-9-1 for the others. Protocol version negotiation is accomplished under the Java profiles by disabling versions on the ports the broker is listening on. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/grkvlt-network-20110301@1076486 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java44
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/url/URLParser_0_10.java49
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/jms/BrokerDetails.java21
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java6
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/Transport.java25
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ChannelLoggingTest.java4
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/ct/DurableSubscriberTest.java4
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/FaultTest.java4
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/QueueTest.java10
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/TopicTest.java18
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java6
-rw-r--r--qpid/java/test-profiles/java-derby.0.10.testprofile8
-rw-r--r--qpid/java/test-profiles/java-derby.0.8.testprofile33
-rw-r--r--qpid/java/test-profiles/java-derby.testprofile10
-rw-r--r--qpid/java/test-profiles/java.0.10.testprofile5
-rw-r--r--qpid/java/test-profiles/java.0.8.testprofile29
-rw-r--r--qpid/java/test-profiles/java.testprofile9
18 files changed, 182 insertions, 105 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
index ee52cd50af..f1563b1f18 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
@@ -26,7 +26,7 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.qpid.jms.BrokerDetails;
-import org.apache.qpid.jms.ConnectionURL;
+import org.apache.qpid.transport.network.Transport;
import org.apache.qpid.url.URLHelper;
import org.apache.qpid.url.URLSyntaxException;
@@ -42,23 +42,26 @@ public class AMQBrokerDetails implements BrokerDetails
public AMQBrokerDetails(){}
+ /**
+ * URL in format {@link BrokerDetails#URL_FORMAT_EXAMPLE}.
+ *
+ * @throws URLSyntaxException
+ */
public AMQBrokerDetails(String url) throws URLSyntaxException
{
-
- // URL should be of format tcp://host:port?option='value',option='value'
try
{
URI connection = new URI(url);
+ // FIXME transport and scheme are not necessarily the same thing
String transport = connection.getScheme();
// Handles some defaults to minimise changes to existing broker URLS e.g. localhost
if (transport != null)
{
- //todo this list of valid transports should be enumerated somewhere
- if ((!(transport.equalsIgnoreCase(BrokerDetails.VM) ||
- transport.equalsIgnoreCase(BrokerDetails.TCP) ||
- transport.equalsIgnoreCase(BrokerDetails.SOCKET))))
+ if ((!(transport.equalsIgnoreCase(Transport.VM) ||
+ transport.equalsIgnoreCase(Transport.TCP) ||
+ transport.equalsIgnoreCase(Transport.SOCKET))))
{
if (transport.equalsIgnoreCase("localhost"))
{
@@ -69,7 +72,7 @@ public class AMQBrokerDetails implements BrokerDetails
{
if (url.charAt(transport.length()) == ':' && url.charAt(transport.length() + 1) != '/')
{
- //Then most likely we have a host:port value
+ // Then most likely we have a host:port value
connection = new URI(DEFAULT_TRANSPORT + "://" + url);
transport = connection.getScheme();
}
@@ -81,20 +84,19 @@ public class AMQBrokerDetails implements BrokerDetails
}
else if (url.indexOf("//") == -1)
{
- throw new URLSyntaxException(url, "Missing '//' after the transport In broker URL",transport.length()+1,1);
+ throw new URLSyntaxException(url, "Missing '//' after the transport In broker URI", transport.length() + 1, 1);
}
}
else
{
- //Default the transport
+ // Default the transport
connection = new URI(DEFAULT_TRANSPORT + "://" + url);
transport = connection.getScheme();
}
if (transport == null)
{
- throw URLHelper.parseError(-1, "Unknown transport in broker URL:'"
- + url + "' Format: " + URL_FORMAT_EXAMPLE, "");
+ throw URLHelper.parseError(-1, "Unknown transport in broker URI:'" + url + "' Format: " + URL_FORMAT_EXAMPLE, "");
}
setTransport(transport);
@@ -122,7 +124,7 @@ public class AMQBrokerDetails implements BrokerDetails
int end = start;
boolean looking = true;
boolean found = false;
- // Throw an URL exception if the port number is not specified
+ // Throw a URL exception if the port number is not specified
if (start == auth.length())
{
throw URLHelper.parseError(connection.toString().indexOf(auth) + end - 1,
@@ -167,7 +169,7 @@ public class AMQBrokerDetails implements BrokerDetails
}
else
{
- if (!_transport.equalsIgnoreCase(SOCKET))
+ if (!_transport.equalsIgnoreCase(Transport.SOCKET))
{
setPort(port);
}
@@ -287,12 +289,12 @@ public class AMQBrokerDetails implements BrokerDetails
sb.append(_transport);
sb.append("://");
- if (!(_transport.equalsIgnoreCase(VM)))
+ if (!(_transport.equalsIgnoreCase(Transport.VM)))
{
sb.append(_host);
}
- if (!(_transport.equalsIgnoreCase(SOCKET)))
+ if (!(_transport.equalsIgnoreCase(Transport.SOCKET)))
{
sb.append(':');
sb.append(_port);
@@ -303,6 +305,7 @@ public class AMQBrokerDetails implements BrokerDetails
return sb.toString();
}
+ @Override
public boolean equals(Object o)
{
if (!(o instanceof BrokerDetails))
@@ -336,16 +339,9 @@ public class AMQBrokerDetails implements BrokerDetails
if (!(_options.isEmpty()))
{
-
for (String key : _options.keySet())
{
- optionsURL.append(key);
-
- optionsURL.append("='");
-
- optionsURL.append(_options.get(key));
-
- optionsURL.append("'");
+ optionsURL.append(key).append("='").append(_options.get(key)).append("'");
optionsURL.append(URLHelper.DEFAULT_OPTION_SEPERATOR);
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/url/URLParser_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/url/URLParser_0_10.java
index 605e9ee154..11be1c095c 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/url/URLParser_0_10.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/url/URLParser_0_10.java
@@ -23,30 +23,32 @@ import java.util.List;
import org.apache.qpid.client.AMQBrokerDetails;
import org.apache.qpid.jms.BrokerDetails;
+import org.apache.qpid.transport.network.Transport;
/**
* The format Qpid URL is based on the AMQP one.
* The grammar is as follows:
- * <p> qpid_url = "qpid:" [client_props "@"] port_addr_list ["/" future-parameters]
- * <p> port_addr_list = [port_addr ","]* port_addr
- * <p> port_addr = tcp_port_addr | tls_prot_addr | future_prot_addr
- * <p> tcp_port_addr = tcp_id tcp_addr
- * <p> tcp_id = "tcp:" | ""
- * <p> tcp_addr = host [":" port]
- * <p> host = <as per http://www.apps.ietf.org/>
- * <p> port = number
- * <p> tls_prot_addr = tls_id tls_addr
- * <p> tls_id = "tls:" | ""
- * <p> tls_addr = host [":" port]
- * <p> future_prot_addr = future_prot_id future_prot_addr
- * <p> future_prot_id = <placeholder, must end in ":". Example "sctp:">
- * <p> future_prot_addr = <placeholder, protocl-specific address>
- * <p> future_parameters = <placeholder, not used in failover addresses>
- * <p> client_props = [client_prop ";"]* client_prop
- * <p> client_prop = prop "=" val
- * <p> prop = chars as per <as per http://www.apps.ietf.org/>
- * <p> val = valid as per <as per http://www.apps.ietf.org/>
- * <p/>
+ * <ul>
+ * <li><em>qpid_url</em> = "qpid:" [client_props "@"] port_addr_list ["/" future-parameters]
+ * <li><em>port_addr_list</em> = [port_addr ","]* port_addr
+ * <li><em>port_addr</em> = tcp_port_addr | tls_prot_addr | future_prot_addr
+ * <li><em>tcp_port_addr</em> = tcp_id tcp_addr
+ * <li><em>tcp_id</em> = "tcp:" | ""
+ * <li><em>tcp_addr</em> = host [":" port]
+ * <li><em>host</em> = <as per http://www.apps.ietf.org/>
+ * <li><em>port</em> = number
+ * <li><em>tls_prot_addr</em> = tls_id tls_addr
+ * <li><em>tls_id</em> = "tls:" | ""
+ * <li><em>tls_addr</em> = host [":" port]
+ * <li><em>future_prot_addr</em> = future_prot_id future_prot_addr
+ * <li><em>future_prot_id</em> = <placeholder, must end in ":". Example "sctp:">
+ * <li><em>future_prot_addr</em> = <placeholder, protocl-specific address>
+ * <li><em>future_parameters</em> = <placeholder, not used in failover addresses>
+ * <li><em>client_props</em> = [client_prop ";"]* client_prop
+ * <li><em>client_prop</em> = prop "=" val
+ * <li><em>prop</em> = chars as per <as per http://www.apps.ietf.org/>
+ * <li><em>val</em> = valid as per <as per http://www.apps.ietf.org/>
+ * </ul>
* Ex: qpid:virtualhost=tcp:host-foo,test,client_id=foo@tcp:myhost.com:5672,virtualhost=prod;
* keystore=/opt/keystore@client_id2@tls:mysecurehost.com:5672
*/
@@ -280,14 +282,13 @@ public class URLParser_0_10
private URLParserState extractTransport()
{
- String transport = buildUntil(TRANSPORT_HOST_SEPARATOR_CHAR);
- if (transport.trim().equals(""))
+ String transport = buildUntil(TRANSPORT_HOST_SEPARATOR_CHAR).trim();
+ if (transport.equals(""))
{
_error = "Transport cannot be empty";
return URLParserState.ERROR;
}
- else if (!(transport.trim().equals(BrokerDetails.PROTOCOL_TCP) || transport.trim()
- .equals(BrokerDetails.PROTOCOL_TLS)))
+ else if (!(transport.equalsIgnoreCase(Transport.TCP) || transport.equalsIgnoreCase(Transport.TLS)))
{
_error = "Transport cannot be " + transport + " value must be tcp or tls";
return URLParserState.ERROR;
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/jms/BrokerDetails.java b/qpid/java/client/src/main/java/org/apache/qpid/jms/BrokerDetails.java
index 6d81f728c9..624ed99f1c 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/jms/BrokerDetails.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/jms/BrokerDetails.java
@@ -23,6 +23,7 @@ package org.apache.qpid.jms;
import java.util.Map;
import org.apache.qpid.client.SSLConfiguration;
+import org.apache.qpid.transport.network.Transport;
public interface BrokerDetails
{
@@ -52,11 +53,7 @@ public interface BrokerDetails
public static final int DEFAULT_PORT = 5672;
- public static final String SOCKET = "socket";
- public static final String TCP = "tcp";
- public static final String VM = "vm";
-
- public static final String DEFAULT_TRANSPORT = TCP;
+ public static final String DEFAULT_TRANSPORT = Transport.TCP;
public static final String URL_FORMAT_EXAMPLE =
"<transport>://<hostname>[:<port Default=\"" + DEFAULT_PORT + "\">][?<option>='<value>'[,<option>='<value>']]";
@@ -64,10 +61,6 @@ public interface BrokerDetails
public static final long DEFAULT_CONNECT_TIMEOUT = 30000L;
public static final boolean USE_SSL_DEFAULT = false;
- // pulled these properties from the new BrokerDetails class in the qpid package
- public static final String PROTOCOL_TCP = "tcp";
- public static final String PROTOCOL_TLS = "tls";
-
public static final String VIRTUAL_HOST = "virtualhost";
public static final String CLIENT_ID = "client_id";
public static final String USERNAME = "username";
@@ -90,18 +83,16 @@ public interface BrokerDetails
void setProperty(String key, String value);
/**
- * Ex: keystore path
- *
- * @return the Properties associated with this connection.
+ * Return the properties associated with this connection.
*/
public Map<String,String> getProperties();
/**
- * Sets the properties associated with this connection
+ * Sets the properties associated with this connection.
*
- * @param props the new p[roperties.
+ * @param props the new properties.
*/
- public void setProperties(Map<String,String> props);
+ public void setProperties(Map<String, String> props);
long getTimeout();
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java
index 2be3720c20..407688c850 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java
@@ -26,6 +26,7 @@ import org.apache.qpid.client.AMQBrokerDetails;
import org.apache.qpid.client.AMQConnectionURL;
import org.apache.qpid.jms.BrokerDetails;
import org.apache.qpid.jms.ConnectionURL;
+import org.apache.qpid.transport.network.Transport;
import org.apache.qpid.url.URLSyntaxException;
public class ConnectionURLTest extends TestCase
@@ -497,10 +498,9 @@ public class ConnectionURLTest extends TestCase
assertNotNull(curl);
assertEquals(1, curl.getBrokerCount());
assertNotNull(curl.getBrokerDetails(0));
- assertEquals(BrokerDetails.SOCKET, curl.getBrokerDetails(0).getTransport());
+ assertEquals(Transport.SOCKET, curl.getBrokerDetails(0).getTransport());
assertEquals("VM-Unique-socketID", curl.getBrokerDetails(0).getHost());
- assertEquals("URL does not toString as expected",
- url.replace(":guest", ":********"), curl.toString());
+ assertEquals("URL does not toString as expected", url.replace(":guest", ":********"), curl.toString());
}
catch (URLSyntaxException e)
{
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/Transport.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/Transport.java
index f0bf04d04f..3ab875262a 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/Transport.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/Transport.java
@@ -24,17 +24,30 @@ package org.apache.qpid.transport.network;
import org.apache.qpid.transport.TransportException;
public class Transport
-{
+{
+ public static final String TCP = "tcp";
+ public static final String TLS = "tls";
+ public static final String SSL = "ssl";
+ public static final String VM = "vm";
+ public static final String SOCKET = "socket";
+
+ public static final int DEFAULT_BUFFER_SIZE = 32 * 1024;
+ public static final long DEFAULT_TIMEOUT = 60000;
+
+ public static final boolean WINDOWS = ((String) System.getProperties().get("os.name")).matches("(?i).*windows.*");
+
+ public static final String IO_TRANSPORT = "org.apache.qpid.transport.network.io.IoNetworkTransport";
+ public static final String MINA_TRANSPORT = "org.apache.qpid.transport.network.mina.MinaNetworkTransport"; // TODO
+ public static final String NIO_TRANSPORT = "org.apache.qpid.transport.network.nio.NioNetworkTransport"; // TODO
+ public static final String NETTY_TRANSPORT = "org.apache.qpid.transport.network.netty.NettyNetworkTransport"; // TODO
+
private final static Class<?> transportClass;
static
{
try
{
- transportClass =
- Class.forName(System.getProperty("qpid.transport",
- "org.apache.qpid.transport.network.io.IoNetworkTransport"));
-
+ transportClass = Class.forName(System.getProperty("qpid.transport", IO_TRANSPORT));
}
catch(Exception e)
{
@@ -53,4 +66,4 @@ public class Transport
throw new TransportException("Error while creating a new transport instance",e);
}
}
-} \ No newline at end of file
+}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ChannelLoggingTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ChannelLoggingTest.java
index 02d0d6f334..1b2ec9c092 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ChannelLoggingTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ChannelLoggingTest.java
@@ -77,7 +77,7 @@ public class ChannelLoggingTest extends AbstractTestLogging
validateMessageID("CHN-1001", log);
assertEquals("Incorrect Channel in actor:"+fromActor(log), isBroker010()? 0 : 1, getChannelID(fromActor(log)));
- if (isBroker08())
+ if (!isBroker010())
{
// Wait to ensure that the CHN-1004 message is logged
waitForMessage("CHN-1004");
@@ -89,7 +89,7 @@ public class ChannelLoggingTest extends AbstractTestLogging
log = getLogMessage(results, 0);
// MESSAGE [con:0(guest@anonymous(3273383)/test)/ch:1] CHN-1004 : Prefetch Size (bytes) {0,number} : Count {1,number}
validateMessageID("CHN-1004", log);
- assertEquals("Incorrect Channel in actor:"+fromActor(log), isBroker010()? 0 : 1, getChannelID(fromActor(log)));
+ assertEquals("Incorrect Channel in actor:"+fromActor(log), 1, getChannelID(fromActor(log)));
assertTrue("Prefetch Count not correct",getMessageString(fromMessage(log)).endsWith("Count "+PREFETCH));
}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java
index 292bcd6039..6f3afbb7e2 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java
@@ -231,7 +231,7 @@ public class AMQConnectionTest extends QpidBrokerTestCase
}
MessageConsumer consumerB = null;
- if (isBroker08())
+ if (!isBroker010())
{
Session consSessB = _connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
consumerB = consSessB.createConsumer(_queue);
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/ct/DurableSubscriberTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/ct/DurableSubscriberTest.java
index 989ac98747..d606250665 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/ct/DurableSubscriberTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/ct/DurableSubscriberTest.java
@@ -52,7 +52,7 @@ public class DurableSubscriberTest extends QpidBrokerTestCase
*/
public void testDurSubRestoredAfterNonPersistentMessageSent() throws Exception
{
- if (isBrokerStorePersistent() || !isBroker08())
+ if (isBrokerStorePersistent() || isBroker010())
{
TopicConnectionFactory factory = getConnectionFactory();
Topic topic = (Topic) getInitialContext().lookup(_topicName);
@@ -116,7 +116,7 @@ public class DurableSubscriberTest extends QpidBrokerTestCase
*/
public void testDurSubRestoresMessageSelector() throws Exception
{
- if (isBrokerStorePersistent() || !isBroker08())
+ if (isBrokerStorePersistent() || isBroker010())
{
TopicConnectionFactory factory = getConnectionFactory();
Topic topic = (Topic) getInitialContext().lookup(_topicName);
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/FaultTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/FaultTest.java
index 47705f8105..6a71578f81 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/FaultTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/FaultTest.java
@@ -94,7 +94,7 @@ public class FaultTest extends AbstractXATestCase
public void tearDown() throws Exception
{
- if (!isBroker08())
+ if (isBroker010())
{
_xaqueueConnection.close();
_queueConnection.close();
@@ -107,7 +107,7 @@ public class FaultTest extends AbstractXATestCase
*/
public void init() throws Exception
{
- if (!isBroker08())
+ if (isBroker010())
{
_queue = (Queue) getInitialContext().lookup(QUEUENAME);
_queueFactory = getConnectionFactory();
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/QueueTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/QueueTest.java
index d2abc0eac1..44763c673b 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/QueueTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/QueueTest.java
@@ -88,7 +88,7 @@ public class QueueTest extends AbstractXATestCase
public void tearDown() throws Exception
{
- if (!isBroker08())
+ if (isBroker010())
{
try
{
@@ -108,7 +108,7 @@ public class QueueTest extends AbstractXATestCase
*/
public void init()
{
- if (!isBroker08())
+ if (isBroker010())
{
// lookup test queue
try
@@ -173,7 +173,7 @@ public class QueueTest extends AbstractXATestCase
*/
public void testProducer()
{
- if (!isBroker08())
+ if (isBroker010())
{
_logger.debug("running testProducer");
Xid xid1 = getNewXid();
@@ -324,7 +324,7 @@ public class QueueTest extends AbstractXATestCase
*/
public void testSendAndRecover()
{
- if (!isBroker08())
+ if (isBroker010())
{
_logger.debug("running testSendAndRecover");
Xid xid1 = getNewXid();
@@ -454,7 +454,7 @@ public class QueueTest extends AbstractXATestCase
*/
public void testRecover()
{
- if (!isBroker08())
+ if (isBroker010())
{
_logger.debug("running testRecover");
Xid xid1 = getNewXid();
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/TopicTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/TopicTest.java
index 99d0f0a075..8c92a3d082 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/TopicTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/xa/TopicTest.java
@@ -96,7 +96,7 @@ public class TopicTest extends AbstractXATestCase
public void tearDown() throws Exception
{
- if (!isBroker08())
+ if (isBroker010())
{
try
{
@@ -116,7 +116,7 @@ public class TopicTest extends AbstractXATestCase
*/
public void init()
{
- if (!isBroker08())
+ if (isBroker010())
{
// lookup test queue
try
@@ -179,7 +179,7 @@ public class TopicTest extends AbstractXATestCase
*/
public void testProducer()
{
- if (!isBroker08())
+ if (isBroker010())
{
_logger.debug("testProducer");
Xid xid1 = getNewXid();
@@ -352,7 +352,7 @@ public class TopicTest extends AbstractXATestCase
*/
public void testDurSub()
{
- if (!isBroker08())
+ if (isBroker010())
{
Xid xid1 = getNewXid();
Xid xid2 = getNewXid();
@@ -506,7 +506,7 @@ public class TopicTest extends AbstractXATestCase
*/
public void testMultiMessagesDurSub()
{
- if (!isBroker08())
+ if (isBroker010())
{
Xid xid1 = getNewXid();
Xid xid2 = getNewXid();
@@ -732,7 +732,7 @@ public class TopicTest extends AbstractXATestCase
*/
public void testMultiMessagesDurSubCrash()
{
- if (!isBroker08())
+ if (isBroker010())
{
Xid xid1 = getNewXid();
Xid xid2 = getNewXid();
@@ -1047,7 +1047,7 @@ public class TopicTest extends AbstractXATestCase
*/
public void testDurSubCrash()
{
- if (!isBroker08())
+ if (isBroker010())
{
Xid xid1 = getNewXid();
Xid xid2 = getNewXid();
@@ -1237,7 +1237,7 @@ public class TopicTest extends AbstractXATestCase
*/
public void testRecover()
{
- if (!isBroker08())
+ if (isBroker010())
{
Xid xid1 = getNewXid();
String durSubName = "test1";
@@ -1389,7 +1389,7 @@ public class TopicTest extends AbstractXATestCase
*/
public void testMigrateDurableSubscriber()
{
- if (!isBroker08())
+ if (isBroker010())
{
Xid xid1 = getNewXid();
Xid xid2 = getNewXid();
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 ae38a75e7a..f32155064a 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
@@ -125,6 +125,12 @@ public class QpidBrokerTestCase extends QpidTestCase
private static final String VERSION_08 = "0-8";
private static final String VERSION_010 = "0-10";
+ private static final String VERSION_0_8 = "0-8";
+ private static final String VERSION_0_9 = "0-9";
+ private static final String VERSION_0_9_1 = "0-9-1";
+ private static final String VERSION_0_91 = "0-91";
+ private static final String VERSION_0_10 = "0-10";
+
protected static final String QPID_HOME = "QPID_HOME";
public static final int DEFAULT_VM_PORT = 1;
diff --git a/qpid/java/test-profiles/java-derby.0.10.testprofile b/qpid/java/test-profiles/java-derby.0.10.testprofile
index ca9115d30d..4dfd563e18 100644
--- a/qpid/java/test-profiles/java-derby.0.10.testprofile
+++ b/qpid/java/test-profiles/java-derby.0.10.testprofile
@@ -16,14 +16,18 @@
# specific language governing permissions and limitations
# under the License.
#
-broker.language=java
+
broker.version=0-10
+qpid.amqp.version=0-10
+
+broker.language=java
broker=${project.root}/build/bin/qpid-server -p @PORT -m @MPORT -c @CONFIG_FILE -l ${test.profiles}/log4j-test.xml
broker.clean=${test.profiles}/clean-dir ${build.data} ${project.root}/build/work
broker.ready=BRK-1004
broker.stopped=Exception
broker.config=${project.root}/build/etc/config-systests-derby.xml
messagestore.class.name=org.apache.qpid.server.store.DerbyMessageStore
-profile.excludes=JavaStandaloneExcludes JavaPersistentExcludes Java010Excludes
broker.clean.between.tests=true
broker.persistent=true
+
+profile.excludes=JavaStandaloneExcludes JavaPersistentExcludes Java010Excludes
diff --git a/qpid/java/test-profiles/java-derby.0.8.testprofile b/qpid/java/test-profiles/java-derby.0.8.testprofile
new file mode 100644
index 0000000000..642e806e17
--- /dev/null
+++ b/qpid/java/test-profiles/java-derby.0.8.testprofile
@@ -0,0 +1,33 @@
+#
+# 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.
+#
+
+broker.version=0-8
+qpid.amqp.version=0-10
+
+broker.language=java
+broker=${project.root}/build/bin/qpid-server -p @PORT -m @MPORT --exclude-0-10 @PORT --exclude-0-9-1 @PORT --exclude-0-9 @PORT -c @CONFIG_FILE -l ${test.profiles}/log4j-test.xml
+broker.clean=${test.profiles}/clean-dir ${build.data} ${project.root}/build/work
+broker.ready=BRK-1004
+broker.stopped=Exception
+broker.config=${project.root}/build/etc/config-systests-derby.xml
+messagestore.class.name=org.apache.qpid.server.store.DerbyMessageStore
+broker.clean.between.tests=true
+broker.persistent=true
+
+profile.excludes=JavaStandaloneExcludes JavaPersistentExcludes 08StandaloneExcludes
diff --git a/qpid/java/test-profiles/java-derby.testprofile b/qpid/java/test-profiles/java-derby.testprofile
index d22e35f07e..b277adb4fa 100644
--- a/qpid/java/test-profiles/java-derby.testprofile
+++ b/qpid/java/test-profiles/java-derby.testprofile
@@ -16,6 +16,10 @@
# specific language governing permissions and limitations
# under the License.
#
+
+broker.version=0-9-1
+qpid.amqp.version=0-10
+
broker.language=java
broker=${project.root}/build/bin/qpid-server -p @PORT -m @MPORT --exclude-0-10 @PORT -c @CONFIG_FILE -l ${test.profiles}/log4j-test.xml
broker.clean=${test.profiles}/clean-dir ${build.data} ${project.root}/build/work
@@ -23,11 +27,7 @@ broker.ready=BRK-1004
broker.stopped=Exception
broker.config=${project.root}/build/etc/config-systests-derby.xml
messagestore.class.name=org.apache.qpid.server.store.DerbyMessageStore
-profile.excludes=JavaStandaloneExcludes JavaPersistentExcludes 08StandaloneExcludes
broker.clean.between.tests=true
broker.persistent=true
-#
-# Do not enable. Allow client to attempt 0-10 and negotiate downwards
-#
-#qpid.amqp.version=0-91
+profile.excludes=JavaStandaloneExcludes JavaPersistentExcludes 08StandaloneExcludes
diff --git a/qpid/java/test-profiles/java.0.10.testprofile b/qpid/java/test-profiles/java.0.10.testprofile
index fa87b22e92..d795a2974e 100644
--- a/qpid/java/test-profiles/java.0.10.testprofile
+++ b/qpid/java/test-profiles/java.0.10.testprofile
@@ -16,8 +16,11 @@
# specific language governing permissions and limitations
# under the License.
#
-broker.language=java
+
broker.version=0-10
+qpid.amqp.version=0-10
+
+broker.language=java
broker=${project.root}/build/bin/qpid-server -p @PORT -m @MPORT -c @CONFIG_FILE -l ${test.profiles}/log4j-test.xml
broker.clean=${test.profiles}/clean-dir ${build.data} ${project.root}/build/work
broker.ready=BRK-1004
diff --git a/qpid/java/test-profiles/java.0.8.testprofile b/qpid/java/test-profiles/java.0.8.testprofile
new file mode 100644
index 0000000000..69a80683fd
--- /dev/null
+++ b/qpid/java/test-profiles/java.0.8.testprofile
@@ -0,0 +1,29 @@
+#
+# 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.
+#
+
+broker.version=0-8
+qpid.amqp.version=0-10
+
+broker.language=java
+broker=${project.root}/build/bin/qpid-server -p @PORT -m @MPORT --exclude-0-10 @PORT --exclude-0-9-1 @PORT --exclude-0-9 @PORT -c @CONFIG_FILE -l ${test.profiles}/log4j-test.xml
+broker.clean=${test.profiles}/clean-dir ${build.data} ${project.root}/build/work
+broker.ready=BRK-1004
+broker.stopped=Exception
+
+profile.excludes=JavaTransientExcludes JavaStandaloneExcludes 08StandaloneExcludes
diff --git a/qpid/java/test-profiles/java.testprofile b/qpid/java/test-profiles/java.testprofile
index c8c776d3e1..f1175c7c39 100644
--- a/qpid/java/test-profiles/java.testprofile
+++ b/qpid/java/test-profiles/java.testprofile
@@ -16,13 +16,14 @@
# specific language governing permissions and limitations
# under the License.
#
+
+broker.version=0-9-1
+qpid.amqp.version=0-10
+
broker.language=java
broker=${project.root}/build/bin/qpid-server -p @PORT -m @MPORT --exclude-0-10 @PORT -c @CONFIG_FILE -l ${test.profiles}/log4j-test.xml
broker.clean=${test.profiles}/clean-dir ${build.data} ${project.root}/build/work
broker.ready=BRK-1004
broker.stopped=Exception
-#
-# Do not enable. Allow client to attempt 0-10 and negotiate downwards
-#
-#qpid.amqp.version=0-91
+
profile.excludes=JavaTransientExcludes JavaStandaloneExcludes 08StandaloneExcludes