summaryrefslogtreecommitdiff
path: root/qpid/java/client
diff options
context:
space:
mode:
authorArnaud Simon <arnaudsimon@apache.org>2007-10-11 10:12:01 +0000
committerArnaud Simon <arnaudsimon@apache.org>2007-10-11 10:12:01 +0000
commit60373d7bf1d14da2a665025826cadb0843de7a62 (patch)
tree9f7b7019af22f0a273354fc2091b3b9e540077ea /qpid/java/client
parentdaaa1f989ff0f1fd18bbb073c2d68d449ef04a88 (diff)
downloadqpid-python-60373d7bf1d14da2a665025826cadb0843de7a62.tar.gz
Updated for running version specific tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@583767 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client')
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java2
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java10
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java18
3 files changed, 25 insertions, 5 deletions
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java
index 04e158bb17..adc0ab2d20 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java
@@ -62,8 +62,6 @@ public class MessageRequeueTest extends TestCase
protected void setUp() throws Exception
{
super.setUp();
- TransportConnection.createVMBroker(1);
-
QpidClientConnection conn = new QpidClientConnection(BROKER);
conn.connect();
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
index f60d944b42..93f80645d5 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
@@ -219,8 +219,14 @@ public class TransactedTest extends QpidTestCase
// ensure sent messages are not visible and received messages are requeued
expect("RB_A", consumer1.receive(1000), true);
expect("RB_B", consumer1.receive(1000), true);
- expect("RB_C", consumer1.receive(1000), true);
-
+ if( isBroker08() )
+ {
+ expect("RB_C", consumer1.receive(1000), true);
+ }
+ else
+ {
+ expect("RB_C", consumer1.receive(1000), false);
+ }
_logger.info("Starting new connection");
testCon.start();
testConsumer1 = testSession.createConsumer(queue1);
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java b/qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java
index fcdd42639d..0399e86425 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java
@@ -46,6 +46,8 @@ public class QpidTestCase extends TestCase
private static final String SHEL = "broker_shel";
private static final String BROKER_PATH = "broker_path";
private static final String BROKER_PARAM = "broker_param";
+ private static final String BROKER_VERSION = "broker_version";
+ public static final String BROKER_08 = "08";
private static final String BROKER_VM = "vm";
private static final String EXT_BROKER = "ext" ;
/**
@@ -58,6 +60,7 @@ public class QpidTestCase extends TestCase
private String _shel = BROKER_VM;
private String _brokerPath = "";
private String _brokerParams = "";
+ private String _brokerVersion = "08" ;
/* The broker communication objects */
private InitialContext _initialContext;
@@ -69,6 +72,10 @@ public class QpidTestCase extends TestCase
{
super.setUp();
// get the propeties if they are set
+ if (System.getProperties().containsKey(BROKER_VERSION ))
+ {
+ _brokerVersion = System.getProperties().getProperty(BROKER_VERSION );
+ }
if (System.getProperties().containsKey(SHEL))
{
_shel = System.getProperties().getProperty(SHEL);
@@ -92,7 +99,7 @@ public class QpidTestCase extends TestCase
TransportConnection.createVMBroker(1);
}
_logger.info("=========================================");
- _logger.info("= " + _shel + " " + _brokerPath + " " + _brokerParams);
+ _logger.info("broker version " + _brokerVersion + " ==== " + _shel + " " + _brokerPath + " " + _brokerParams);
}
/**
@@ -142,6 +149,15 @@ public class QpidTestCase extends TestCase
}
/**
+ * Check whether the broker is an 0.8
+ * @return true if the broker is an 0_8 version, false otherwise.
+ */
+ public boolean isBroker08()
+ {
+ return _brokerVersion.equals(BROKER_08);
+ }
+
+ /**
* Stop the currently running broker.
*/
public void stopBroker()