Author: ningjiang
Date: Mon Feb  2 08:02:05 2009
New Revision: 739937

URL: http://svn.apache.org/viewvc?rev=739937&view=rev
Log:
CXF-2019 This should really fix the test error in windows box

Modified:
    
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
    
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml

Modified: 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java?rev=739937&r1=739936&r2=739937&view=diff
==============================================================================
--- 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
 (original)
+++ 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
 Mon Feb  2 08:02:05 2009
@@ -34,14 +34,10 @@
 public class ClientServerSessionTest extends AbstractBusClientServerTestBase {
     @BeforeClass
     public static void startServers() throws Exception {
-        // Jetty server only detects the the port of the same process in 
Windows box
-        if (System.getProperty("os.name").startsWith("Windows")) {
-            assertTrue("server did not launch correctly",
-                   launchServer(SessionServer.class, true));
-        } else {
-            assertTrue("server did not launch correctly",
+        
+        assertTrue("server did not launch correctly",
                        launchServer(SessionServer.class));
-        }
+        
     }
     
     
@@ -110,7 +106,7 @@
             Endpoint.publish(address, implementor);
             fail("Should have failed to publish as the port is busy");
         } catch (WebServiceException ex) {
-            //ignore
+            //ignore            
         }
         try {
             //CXF-1589

Modified: 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml?rev=739937&r1=739936&r2=739937&view=diff
==============================================================================
--- 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml
 (original)
+++ 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml
 Mon Feb  2 08:02:05 2009
@@ -36,6 +36,9 @@
   <httpj:engine-factory bus="cxf">
         <httpj:engine port="9020">
             <httpj:sessionSupport>true</httpj:sessionSupport>
+            <!-- If the reuseAddress is true and running in a Windows box, 
+            Jetty will not throw the java.net.BindException even the port is 
already used  -->
+            <httpj:reuseAddress>false</httpj:reuseAddress>
          </httpj:engine>
    </httpj:engine-factory>  
 </beans>
\ No newline at end of file


Reply via email to