Return-Path: Delivered-To: apmail-incubator-cxf-commits-archive@locus.apache.org Received: (qmail 27493 invoked from network); 11 Jun 2007 08:30:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jun 2007 08:30:30 -0000 Received: (qmail 56255 invoked by uid 500); 11 Jun 2007 08:30:33 -0000 Delivered-To: apmail-incubator-cxf-commits-archive@incubator.apache.org Received: (qmail 56196 invoked by uid 500); 11 Jun 2007 08:30:33 -0000 Mailing-List: contact cxf-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-commits@incubator.apache.org Received: (qmail 56168 invoked by uid 99); 11 Jun 2007 08:30:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2007 01:30:33 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2007 01:30:29 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 797161A981A; Mon, 11 Jun 2007 01:30:08 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r546043 - /incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/spring/PolicyFeatureTest.java Date: Mon, 11 Jun 2007 08:30:08 -0000 To: cxf-commits@incubator.apache.org From: ningjiang@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070611083008.797161A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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);