cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1513188 - in /cxf/trunk: core/src/test/java/org/apache/cxf/bus/spring/ rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/ rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/spring/ rt/ws/policy/src/test/java/org/apache/cxf/ws...
Date Mon, 12 Aug 2013 16:22:05 GMT
Author: dkulp
Date: Mon Aug 12 16:22:04 2013
New Revision: 1513188

URL: http://svn.apache.org/r1513188
Log:
Close some contexts to avoid some eclipse warnings

Modified:
    cxf/trunk/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java
    cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
    cxf/trunk/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/spring/JAXRSClientFactoryBeanTest.java
    cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/IgnorablePolicyInterceptorProviderTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JMSServer.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
    cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
    cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java

Modified: cxf/trunk/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java?rev=1513188&r1=1513187&r2=1513188&view=diff
==============================================================================
--- cxf/trunk/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java
(original)
+++ cxf/trunk/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java
Mon Aug 12 16:22:04 2013
@@ -40,7 +40,9 @@ public class BusApplicationContextTest e
         String cfgFile = "/org/apache/cxf/bus/spring/resources/bus-overwrite.xml";
         ctx = new BusApplicationContext(cfgFile, false);
         assertEquals("Unexpected number of resources", 1, ctx.getConfigResources().length);
+        ctx.close();
         ctx = new BusApplicationContext(cfgFile, true);
         assertEquals("Unexpected number of resources", 2, ctx.getConfigResources().length);
+        ctx.close();
     }
 }

Modified: cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java?rev=1513188&r1=1513187&r2=1513188&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
Mon Aug 12 16:22:04 2013
@@ -359,6 +359,7 @@ public class SpringBeansTest extends Ass
         Greeter g1 = greeters.getGreet1();
         Greeter g2 = greeters.getGreet2();
         assertNotSame(g1, g2);
+        ctx.close();
     }
     @Test
     public void testClientFromFactory() throws Exception {
@@ -377,6 +378,7 @@ public class SpringBeansTest extends Ass
                 return;
             }
         }
+        ctx.close();
         fail("Did not configure the client");
     }
     @Test
@@ -396,7 +398,7 @@ public class SpringBeansTest extends Ass
         assertNotNull(greeter2);
         Client client2 = ClientProxy.getClient(greeter2);
         assertSame(client1.getBus(), client2.getBus());
-
+        ctx.close();
     }
 
     @Test

Modified: cxf/trunk/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/spring/JAXRSClientFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/spring/JAXRSClientFactoryBeanTest.java?rev=1513188&r1=1513187&r2=1513188&view=diff
==============================================================================
--- cxf/trunk/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/spring/JAXRSClientFactoryBeanTest.java
(original)
+++ cxf/trunk/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/spring/JAXRSClientFactoryBeanTest.java
Mon Aug 12 16:22:04 2013
@@ -62,6 +62,8 @@ public class JAXRSClientFactoryBeanTest 
         assertEquals("Get a wrong map size", cfb.getHeaders().size(), 1);
         assertEquals("Get a wrong username", cfb.getUsername(), "username");
         assertEquals("Get a wrong password", cfb.getPassword(), "password");
+        ctx.close();
+
     }
 
 }

Modified: cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/IgnorablePolicyInterceptorProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/IgnorablePolicyInterceptorProviderTest.java?rev=1513188&r1=1513187&r2=1513188&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/IgnorablePolicyInterceptorProviderTest.java
(original)
+++ cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/IgnorablePolicyInterceptorProviderTest.java
Mon Aug 12 16:22:04 2013
@@ -167,6 +167,7 @@ public class IgnorablePolicyInterceptorP
 
             assertEquals(pips1.iterator().next(), pips2.iterator().next());
 
+            context.close();
         } finally {
             if (null != cxf1) {
                 cxf1.shutdown(true);

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JMSServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JMSServer.java?rev=1513188&r1=1513187&r2=1513188&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JMSServer.java (original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JMSServer.java Mon
Aug 12 16:22:04 2013
@@ -23,15 +23,19 @@ import org.springframework.context.suppo
 
 public class JMSServer extends AbstractBusTestServerBase {
 
-
+    ClassPathXmlApplicationContext context;
+    
     protected void run()  {
         // create the application context
-        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
+        context = new ClassPathXmlApplicationContext(
             "org/apache/cxf/systest/jaxrs/resources/jms_server_config.xml");
         context.start();
     }
 
-
+    public void tearDown() {
+        context.close();
+    }
+    
     public static void main(String[] args) {
         try {
             JMSServer s = new JMSServer();

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java?rev=1513188&r1=1513187&r2=1513188&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
Mon Aug 12 16:22:04 2013
@@ -103,6 +103,7 @@ public class JAXRSHttpsBookTest extends 
         assertEquals(b.getId(), 123);
         b = wc.get(TheBook.class);
         assertEquals(b.getId(), 123);
+        ctx.close();
     }
     
     @Test
@@ -123,6 +124,7 @@ public class JAXRSHttpsBookTest extends 
         assertEquals(b.getId(), 123);
         b = wc.get(TheBook.class);
         assertEquals(b.getId(), 123);
+        ctx.close();
     }
     
     private void doTestGetBook123ProxyFromSpring(String cfgFile) throws Exception {
@@ -145,6 +147,7 @@ public class JAXRSHttpsBookTest extends 
         assertEquals(b.getId(), 123);
         b = bs.getSecureBook("123");
         assertEquals(b.getId(), 123);
+        ctx.close();
     }
     
     @Test

Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java?rev=1513188&r1=1513187&r2=1513188&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
(original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
Mon Aug 12 16:22:04 2013
@@ -513,6 +513,7 @@ public class JMSClientServerTest extends
                 } 
             }
         } catch (UndeclaredThrowableException ex) {
+            ctx.close();
             throw (Exception)ex.getCause();
         }
         

Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java?rev=1513188&r1=1513187&r2=1513188&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java
(original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java
Mon Aug 12 16:22:04 2013
@@ -46,14 +46,15 @@ public class JMSTransactionClientServerT
     static EmbeddedJMSBrokerLauncher broker;
 
     public static class Server extends AbstractBusTestServerBase {
-    
+        ClassPathXmlApplicationContext context;
+        EndpointImpl endpoint;
         protected void run()  {
             // create the application context
-            ClassPathXmlApplicationContext context = 
+            context = 
                 new ClassPathXmlApplicationContext("org/apache/cxf/systest/jms/tx/jms_server_config.xml");
             context.start();
             
-            EndpointImpl endpoint = new EndpointImpl(new GreeterImplWithTransaction());
+            endpoint = new EndpointImpl(new GreeterImplWithTransaction());
             endpoint.setAddress("jms://");
             JMSConfiguration jmsConfig = new JMSConfiguration();
     
@@ -72,6 +73,10 @@ public class JMSTransactionClientServerT
             endpoint.getFeatures().add(jmsConfigFeature);
             endpoint.publish();
         }
+        public void tearDown() {
+            endpoint.stop();
+            context.close();
+        }
     }
 
     @BeforeClass

Modified: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java?rev=1513188&r1=1513187&r2=1513188&view=diff
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java
(original)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java
Mon Aug 12 16:22:04 2013
@@ -77,7 +77,7 @@ public class SpringBusFactoryTest extend
         checkBindingExtensions(bus);
         checkHTTPTransportFactories(bus);
         checkOtherCoreExtensions(bus);
-        ctx.destroy();
+        ctx.close();
     }
     
     private void checkBindingExtensions(Bus bus) throws BusException {



Mime
View raw message