Author: arnaudsimon
Date: Thu Oct 11 03:12:01 2007
New Revision: 583767

URL: http://svn.apache.org/viewvc?rev=583767&view=rev
Log:
Updated for running version specific tests

Modified:
    
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java
    
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
    
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java

Modified: 
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java?rev=583767&r1=583766&r2=583767&view=diff
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java
 Thu Oct 11 03:12:01 2007
@@ -62,8 +62,6 @@
     protected void setUp() throws Exception
     {
         super.setUp();
-        TransportConnection.createVMBroker(1);
-
         QpidClientConnection conn = new QpidClientConnection(BROKER);
 
         conn.connect();

Modified: 
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java?rev=583767&r1=583766&r2=583767&view=diff
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
 Thu Oct 11 03:12:01 2007
@@ -219,8 +219,14 @@
             // 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);

Modified: 
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java?rev=583767&r1=583766&r2=583767&view=diff
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java
 Thu Oct 11 03:12:01 2007
@@ -46,6 +46,8 @@
     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 @@
     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 @@
     {
         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 @@
             TransportConnection.createVMBroker(1);
         }
         _logger.info("=========================================");
-        _logger.info("= " + _shel + " " + _brokerPath + " " + _brokerParams);
+        _logger.info("broker version " + _brokerVersion + " ==== " + _shel + " 
" + _brokerPath + " " + _brokerParams);
     }
 
     /**
@@ -139,6 +146,15 @@
         {
             this.wait(1000);
         }
+    }
+
+    /**
+     * 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);
     }
 
     /**


Reply via email to