You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by az...@apache.org on 2008/01/16 06:57:16 UTC

svn commit: r612361 - in /webservices/axis2/trunk/java/modules/clustering: pom.xml test/org/apache/axis2/clustering/ContextReplicationTest.java

Author: azeez
Date: Tue Jan 15 21:57:15 2008
New Revision: 612361

URL: http://svn.apache.org/viewvc?rev=612361&view=rev
Log:
Adding a property, run.clustering.tests, which has to be set to true if clustering tests are to be executed.


Modified:
    webservices/axis2/trunk/java/modules/clustering/pom.xml
    webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ContextReplicationTest.java

Modified: webservices/axis2/trunk/java/modules/clustering/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/pom.xml?rev=612361&r1=612360&r2=612361&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/clustering/pom.xml Tue Jan 15 21:57:15 2008
@@ -69,6 +69,16 @@
                 <inherited>true</inherited>
                 <configuration>
                     <skip>false</skip>
+                    <systemProperties>
+                        <property>
+                            <name>maven.test.haltafterfailure</name>
+                            <value>false</value>
+                        </property>
+                        <property>
+                            <name>run.clustering.tests</name>
+                            <value>true</value>
+                        </property>
+                    </systemProperties>
                     <excludes>
                         <exclude>**/UpdateStateTest.java</exclude>
                         <exclude>**/ConfigurationManagerTest.java</exclude>

Modified: webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ContextReplicationTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ContextReplicationTest.java?rev=612361&r1=612360&r2=612361&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ContextReplicationTest.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ContextReplicationTest.java Tue Jan 15 21:57:15 2008
@@ -73,7 +73,7 @@
     private AxisService service2;
     //---------------------------------------------------------------------------------
 
-    private static boolean canMulticast;
+    private static boolean canRunTests;
 
     private int getPort(int portStart, int retries) throws IOException {
         InetSocketAddress addr = null;
@@ -101,7 +101,11 @@
         return port;
     }
 
-    private void checkMulticast() {
+    private void canRunTests() {
+        if(System.getProperty("run.clustering.tests", "false").equals("false")){
+            canRunTests = false;
+            return;
+        }
 
         // Which port should we listen to
         final int port;
@@ -109,7 +113,7 @@
             port = getPort(4000, 1000);
         } catch (IOException e) {
             e.printStackTrace();
-            canMulticast = false;
+            canRunTests = false;
             return;
         }
 
@@ -131,10 +135,10 @@
                                        pack.getLength());
                     s.leaveGroup(InetAddress.getByName(group));
                     s.close();
-                    canMulticast = true;
+                    canRunTests = true;
                 } catch (Exception e) {
                     e.printStackTrace();
-                    canMulticast = false;
+                    canRunTests = false;
                 }
             }
         };
@@ -156,7 +160,7 @@
                     s.close();
                 } catch (Exception e) {
                     e.printStackTrace();
-                    canMulticast = false;
+                    canRunTests = false;
                 }
             }
         };
@@ -171,13 +175,13 @@
     }
 
     public static void main(String[] args) {
-        new ContextReplicationTest().checkMulticast();
+        new ContextReplicationTest().canRunTests();
     }
 
     protected void setUp() throws Exception {
-        checkMulticast();
-        if (!canMulticast) {
-            System.out.println("[WARNING] Aborting clustering test since multicasting cannot be carried out");
+        canRunTests();
+        if (!canRunTests) {
+            System.out.println("[WARNING] Aborting clustering tests");
             return;
         }
 
@@ -254,7 +258,7 @@
     }
 
     public void testSetPropertyInConfigurationContext() throws Exception {
-        if (!canMulticast) {
+        if (!canRunTests) {
             return;
         }
 
@@ -279,7 +283,7 @@
     }
 
     public void testRemovePropertyFromConfigurationContext() throws Exception {
-        if (!canMulticast) {
+        if (!canRunTests) {
             return;
         }
 
@@ -303,7 +307,7 @@
     }
 
     public void testSetPropertyInServiceGroupContext() throws Exception {
-        if (!canMulticast) {
+        if (!canRunTests) {
             return;
         }
 
@@ -327,7 +331,7 @@
     }
 
     public void testRemovePropertyFromServiceGroupContext() throws Exception {
-        if (!canMulticast) {
+        if (!canRunTests) {
             return;
         }
 
@@ -358,7 +362,7 @@
     }
 
     public void testSetPropertyInServiceGroupContext2() throws Exception {
-        if (!canMulticast) {
+        if (!canRunTests) {
             return;
         }
 
@@ -385,7 +389,7 @@
     }
 
     public void testRemovePropertyFromServiceGroupContext2() throws Exception {
-        if (!canMulticast) {
+        if (!canRunTests) {
             return;
         }
 
@@ -419,7 +423,7 @@
     }
 
     public void testSetPropertyInServiceContext() throws Exception {
-        if (!canMulticast) {
+        if (!canRunTests) {
             return;
         }
 
@@ -448,7 +452,7 @@
     }
 
     public void testSetPropertyInServiceContext2() throws Exception {
-        if (!canMulticast) {
+        if (!canRunTests) {
             return;
         }
 
@@ -477,7 +481,7 @@
     }
 
     public void testRemovePropertyFromServiceContext() throws Exception {
-        if (!canMulticast) {
+        if (!canRunTests) {
             return;
         }
 
@@ -513,7 +517,7 @@
     }
 
     public void testRemovePropertyFromServiceContext2() throws Exception {
-        if (!canMulticast) {
+        if (!canRunTests) {
             return;
         }
 
@@ -549,7 +553,7 @@
     }
 
     public void testReplicationExclusion1() throws Exception {
-        if (!canMulticast) {
+        if (!canRunTests) {
             return;
         }
 
@@ -566,7 +570,7 @@
     }
 
     public void testReplicationExclusion2() throws Exception {
-        if (!canMulticast) {
+        if (!canRunTests) {
             return;
         }
 
@@ -584,7 +588,7 @@
     }
 
     public void testReplicationExclusion3() throws Exception {
-        if (!canMulticast) {
+        if (!canRunTests) {
             return;
         }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org