Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A9DF6D79E for ; Fri, 16 Nov 2012 15:46:02 +0000 (UTC) Received: (qmail 21877 invoked by uid 500); 16 Nov 2012 15:46:02 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 21762 invoked by uid 500); 16 Nov 2012 15:46:01 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 21737 invoked by uid 99); 16 Nov 2012 15:46:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Nov 2012 15:46:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Nov 2012 15:45:59 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 812572388900; Fri, 16 Nov 2012 15:45:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1410408 - in /cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy: AddressingOptionalPolicyTest.java AddressingPolicyTest.java HTTPClientPolicyTest.java NestedAddressingPolicyTest.java RMPolicyTest.java Date: Fri, 16 Nov 2012 15:45:38 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121116154539.812572388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Fri Nov 16 15:45:37 2012 New Revision: 1410408 URL: http://svn.apache.org/viewvc?rev=1410408&view=rev Log: More teardown fixes Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/AddressingOptionalPolicyTest.java cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/AddressingPolicyTest.java cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/NestedAddressingPolicyTest.java cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/AddressingOptionalPolicyTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/AddressingOptionalPolicyTest.java?rev=1410408&r1=1410407&r2=1410408&view=diff ============================================================================== --- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/AddressingOptionalPolicyTest.java (original) +++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/AddressingOptionalPolicyTest.java Fri Nov 16 15:45:37 2012 @@ -60,6 +60,7 @@ public class AddressingOptionalPolicyTes public static class Server extends AbstractBusTestServerBase { String tmpDir = TEMPDIR; + Endpoint ep; public Server() { } public Server(String dir) { @@ -71,6 +72,7 @@ public class AddressingOptionalPolicyTes SpringBusFactory bf = new SpringBusFactory(); Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/addr-optional.xml"); BusFactory.setDefaultBus(bus); + setBus(bus); LoggingInInterceptor in = new LoggingInInterceptor(); bus.getInInterceptors().add(in); bus.getInFaultInterceptors().add(in); @@ -80,9 +82,13 @@ public class AddressingOptionalPolicyTes GreeterImpl implementor = new GreeterImpl(); String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort"; - Endpoint.publish(address, implementor); + ep = Endpoint.publish(address, implementor); LOG.info("Published greeter endpoint."); } + public void tearDown() { + ep.stop(); + ep = null; + } public static void main(String[] args) { Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/AddressingPolicyTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/AddressingPolicyTest.java?rev=1410408&r1=1410407&r2=1410408&view=diff ============================================================================== --- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/AddressingPolicyTest.java (original) +++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/AddressingPolicyTest.java Fri Nov 16 15:45:37 2012 @@ -55,6 +55,7 @@ public class AddressingPolicyTest extend public static class Server extends AbstractBusTestServerBase { String tmpDir = TEMPDIR; + Endpoint ep; public Server() { } public Server(String dir) { @@ -69,6 +70,7 @@ public class AddressingPolicyTest extend SpringBusFactory bf = new SpringBusFactory(); Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/addr.xml"); BusFactory.setDefaultBus(bus); + setBus(bus); LoggingInInterceptor in = new LoggingInInterceptor(); bus.getInInterceptors().add(in); bus.getInFaultInterceptors().add(in); @@ -78,9 +80,13 @@ public class AddressingPolicyTest extend GreeterImpl implementor = new GreeterImpl(); String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort"; - Endpoint.publish(address, implementor); + ep = Endpoint.publish(address, implementor); LOG.info("Published greeter endpoint."); } + public void tearDown() { + ep.stop(); + ep = null; + } public static void main(String[] args) { Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java?rev=1410408&r1=1410407&r2=1410408&view=diff ============================================================================== --- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java (original) +++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java Fri Nov 16 15:45:37 2012 @@ -68,11 +68,11 @@ public class HTTPClientPolicyTest extend new QName("http://cxf.apache.org/greeter_control", "BasicGreeterService"); public static class Server extends AbstractBusTestServerBase { - + Endpoint ep; protected void run() { SpringBusFactory bf = new SpringBusFactory(); Bus bus = bf.createBus(); - + setBus(bus); BusFactory.setDefaultBus(bus); LoggingInInterceptor in = new LoggingInInterceptor(); LoggingOutInterceptor out = new LoggingOutInterceptor(); @@ -83,10 +83,13 @@ public class HTTPClientPolicyTest extend HttpGreeterImpl implementor = new HttpGreeterImpl(); implementor.setThrowAlways(true); String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort"; - Endpoint.publish(address, implementor); + ep = Endpoint.publish(address, implementor); LOG.info("Published greeter endpoint."); } - + public void tearDown() { + ep.stop(); + ep = null; + } public static void main(String[] args) { try { Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/NestedAddressingPolicyTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/NestedAddressingPolicyTest.java?rev=1410408&r1=1410407&r2=1410408&view=diff ============================================================================== --- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/NestedAddressingPolicyTest.java (original) +++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/NestedAddressingPolicyTest.java Fri Nov 16 15:45:37 2012 @@ -24,6 +24,7 @@ import java.util.logging.Logger; import javax.xml.ws.Endpoint; import org.apache.cxf.Bus; +import org.apache.cxf.BusFactory; import org.apache.cxf.bus.spring.SpringBusFactory; import org.apache.cxf.common.logging.LogUtils; import org.apache.cxf.greeter_control.BasicGreeterService; @@ -46,7 +47,7 @@ public class NestedAddressingPolicyTest protected void run() { SpringBusFactory bf = new SpringBusFactory(); Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/http-addr-server.xml"); - + setBus(bus); GreeterImpl implementor = new GreeterImpl(); implementor.setThrowAlways(true); Endpoint.publish("http://localhost:" + PORT + "/SoapContext/GreeterPort", implementor); @@ -86,7 +87,8 @@ public class NestedAddressingPolicyTest // use a plain client SpringBusFactory bf = new SpringBusFactory(); - Bus bus = bf.createBus(); + bus = bf.createBus(); + BusFactory.setDefaultBus(bus); BasicGreeterService gs = new BasicGreeterService(); final Greeter greeter = gs.getGreeterPort(); @@ -107,6 +109,5 @@ public class NestedAddressingPolicyTest e.getMessage().contains("Addressing Property is not present")); } ((Closeable)greeter).close(); - } } \ No newline at end of file Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java?rev=1410408&r1=1410407&r2=1410408&view=diff ============================================================================== --- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java (original) +++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java Fri Nov 16 15:45:37 2012 @@ -72,6 +72,7 @@ public class RMPolicyTest extends Abstra public static class Server extends AbstractBusTestServerBase { String tmpDir = TEMPDIR; + Endpoint ep; public Server() { } public Server(String dir) { @@ -82,6 +83,7 @@ public class RMPolicyTest extends Abstra SpringBusFactory bf = new SpringBusFactory(); Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/rm.xml"); BusFactory.setDefaultBus(bus); + setBus(bus); LoggingInInterceptor in = new LoggingInInterceptor(); bus.getInInterceptors().add(in); LoggingOutInterceptor out = new LoggingOutInterceptor(); @@ -90,10 +92,13 @@ public class RMPolicyTest extends Abstra GreeterImpl implementor = new GreeterImpl(); String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort"; - Endpoint.publish(address, implementor); + ep = Endpoint.publish(address, implementor); LOG.info("Published greeter endpoint."); } - + public void tearDown() { + ep.stop(); + ep = null; + } public static void main(String[] args) { try {