Author: ningjiang
Date: Mon Jun 11 01:30:07 2007
New Revision: 546043

URL: http://svn.apache.org/viewvc?view=rev&rev=546043
Log:
Fixed the PolicyFeatureTest throws java.net.SocketException: Permission denied 
in linux box

Modified:
    
incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/spring/PolicyFeatureTest.java

Modified: 
incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/spring/PolicyFeatureTest.java
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/spring/PolicyFeatureTest.java?view=diff&rev=546043&r1=546042&r2=546043
==============================================================================
--- 
incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/spring/PolicyFeatureTest.java
 (original)
+++ 
incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/spring/PolicyFeatureTest.java
 Mon Jun 11 01:30:07 2007
@@ -39,14 +39,16 @@
 import org.junit.Test;
 
 public class PolicyFeatureTest extends Assert {
+    private Bus bus;
     @After
     public void tearDown() {
+        bus.shutdown(false);
         BusFactory.setDefaultBus(null);
     }
     
     @Test
     public void testServerFactory() {
-        Bus bus = new CXFBusFactory().createBus();
+        bus = new CXFBusFactory().createBus();
         
         Policy p = new Policy();
         p.setId("test");
@@ -54,7 +56,7 @@
         JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
         sf.getFeatures().add(new WSPolicyFeature(p));
         sf.setServiceBean(new GreeterImpl());
-        sf.setAddress("http://localhost/test";);
+        sf.setAddress("http://localhost:9001/test";);
         sf.setStart(false);
         sf.setBus(bus);
         Server server = sf.create();
@@ -72,12 +74,11 @@
 
     @Test
     public void testServerFactoryWith2007Xml() {
-        Bus bus = 
-            new 
SpringBusFactory().createBus("/org/apache/cxf/ws/policy/spring/server.xml");
+        bus = new 
SpringBusFactory().createBus("/org/apache/cxf/ws/policy/spring/server.xml");
         
         JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
         sf.setServiceBean(new GreeterImpl());
-        sf.setAddress("http://localhost/test";);
+        sf.setAddress("http://localhost:9001/test";);
         sf.setStart(false);
         sf.setBus(bus);
         
@@ -101,12 +102,12 @@
 
     @Test
     public void testServerFactoryWith2004Xml() {
-        Bus bus = 
+        bus = 
             new 
SpringBusFactory().createBus("/org/apache/cxf/ws/policy/spring/server.xml");
         
         JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
         sf.setServiceBean(new GreeterImpl());
-        sf.setAddress("http://localhost/test";);
+        sf.setAddress("http://localhost:9001/test";);
         sf.setStart(false);
         sf.setBus(bus);
         
@@ -130,12 +131,12 @@
     
     @Test
     public void testPolicyReference() {
-        Bus bus = 
+        bus = 
             new 
SpringBusFactory().createBus("/org/apache/cxf/ws/policy/spring/server.xml");
         
         JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
         sf.setServiceBean(new GreeterImpl());
-        sf.setAddress("http://localhost/test";);
+        sf.setAddress("http://localhost:9001/test";);
         sf.setStart(false);
         sf.setBus(bus);
         


Reply via email to