You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ni...@apache.org on 2007/10/23 05:44:06 UTC

svn commit: r587381 - /incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java

Author: ningjiang
Date: Mon Oct 22 20:44:06 2007
New Revision: 587381

URL: http://svn.apache.org/viewvc?rev=587381&view=rev
Log:
Fixed the EngineLifecycleTest ran issue by sleeping for a while

Modified:
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java?rev=587381&r1=587380&r2=587381&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java Mon Oct 22 20:44:06 2007
@@ -46,7 +46,7 @@
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
-import org.junit.Ignore;
+
 
 import org.junit.Test;
 import org.mortbay.jetty.Connector;
@@ -76,7 +76,7 @@
     
     @Before 
     public void setSystemProperties() {
-        close = System.getProperty("org.apache.cxf.transports.http_jetty.DontClosePort");
+        close = System.getProperty("org.apache.cxf.transports.http_jetty.DontClosePort");        
         System.setProperty("org.apache.cxf.transports.http_jetty.DontClosePort", "false");
         
     }
@@ -162,6 +162,7 @@
         bus.shutdown(true);
         applicationContext.destroy();
         applicationContext.close();
+        //Waiting for the releasing of the socket
         Thread.sleep(2000);
         
     }
@@ -221,7 +222,8 @@
                 turnedOnReuseAddr = socket.getReuseAddress();
             }
         }
-        assertTrue(turnedOnReuseAddr); // insure that we actually found the server for 8801 and did the deed.
+        assertTrue("Did not set the socket's ReuseAddress to be true", turnedOnReuseAddr); 
+        // insure that we actually found the server for the port and did the deed.
         
     }
     
@@ -242,8 +244,7 @@
      * 
      * @throws Exception
      */
-    @Test
-    @Ignore("not working yet")
+    @Test   
     public void testServerUpDownUp() throws Exception {
         
         setUpBus(true);
@@ -255,7 +256,9 @@
         shutdownService();
         verifyNoServer(8808);
         verifyNoServer(8801);
-        
+        // For some multicores linux box
+        // It will take more time to release the socket
+        Thread.sleep(4000);
         
         setUpBus(true);
         setReuseAddrForServer(8801);