Author: saminda
Date: Wed Jan  2 06:44:58 2008
New Revision: 11772

Log:

Fixes for testtimeout 


Modified:
   trunk/wsas/java/modules/admin/pom.xml
   trunk/wsas/java/modules/core/pom.xml
   trunk/wsas/java/modules/core/test/org/wso2/wsas/AbstractTestCase.java
   trunk/wsas/java/modules/integration/pom.xml

Modified: trunk/wsas/java/modules/admin/pom.xml
==============================================================================
--- trunk/wsas/java/modules/admin/pom.xml       (original)
+++ trunk/wsas/java/modules/admin/pom.xml       Wed Jan  2 06:44:58 2008
@@ -106,6 +106,10 @@
                             <name>maven.test.haltafterfailure</name>
                             <value>false</value>
                         </property>
+                        <property>
+                            <name>wsas.test.timeout</name>
+                            <value>1200000</value>
+                        </property>
                     </systemProperties>
                     <forkMode>pertest</forkMode>
                     <argLine>-enableassertions</argLine>

Modified: trunk/wsas/java/modules/core/pom.xml
==============================================================================
--- trunk/wsas/java/modules/core/pom.xml        (original)
+++ trunk/wsas/java/modules/core/pom.xml        Wed Jan  2 06:44:58 2008
@@ -99,6 +99,10 @@
                             <name>maven.test.haltafterfailure</name>
                             <value>false</value>
                         </property>
+                        <property>
+                            <name>wsas.test.timeout</name>
+                            <value>1200000</value>
+                        </property>
                     </systemProperties>
                     <!--<forkMode>pertest</forkMode>-->
                     <argLine>-enableassertions</argLine>

Modified: trunk/wsas/java/modules/core/test/org/wso2/wsas/AbstractTestCase.java
==============================================================================
--- trunk/wsas/java/modules/core/test/org/wso2/wsas/AbstractTestCase.java       
(original)
+++ trunk/wsas/java/modules/core/test/org/wso2/wsas/AbstractTestCase.java       
Wed Jan  2 06:44:58 2008
@@ -35,6 +35,7 @@
 
     protected ServerUtils serverUtils;
     protected Thread serverThread;
+    protected long wsasTestTimeout = 2*60000;
 
     protected OMElement createEchoPayload() {
         OMFactory fac = OMAbstractFactory.getOMFactory();
@@ -98,7 +99,11 @@
                 Thread.sleep(1000);
                 break;
             } catch (IOException e) {
-                if(System.currentTimeMillis() - start >= 60000){
+                String timeoutValue = System.getProperty("wsas.test.timeout");
+                if (timeoutValue != null) {
+                    wsasTestTimeout = Long.parseLong(timeoutValue);
+                }
+                if(System.currentTimeMillis() - start >= wsasTestTimeout){
                     throw new Exception("Could not connect to WSO2 WSAS 
instance. " +
                                         "Timeout occurred.");
                 }

Modified: trunk/wsas/java/modules/integration/pom.xml
==============================================================================
--- trunk/wsas/java/modules/integration/pom.xml (original)
+++ trunk/wsas/java/modules/integration/pom.xml Wed Jan  2 06:44:58 2008
@@ -157,6 +157,10 @@
                             <name>maven.test.haltafterfailure</name>
                             <value>false</value>
                         </property>
+                        <property>
+                            <name>wsas.test.timeout</name>
+                            <value>1200000</value>
+                        </property>
                     </systemProperties>
                     <forkMode>pertest</forkMode>
                     <argLine>-enableassertions</argLine>

_______________________________________________
Wsas-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev

Reply via email to