cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1335054 - in /cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring: ApplicationContextTest.java bean.properties beans-props.xml
Date Mon, 07 May 2012 15:13:27 GMT
Author: dkulp
Date: Mon May  7 15:13:27 2012
New Revision: 1335054

URL: http://svn.apache.org/viewvc?rev=1335054&view=rev
Log:
Fix tests that fail if run in different order (required proper cleanups)

Modified:
    cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
    cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
    cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml

Modified: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java?rev=1335054&r1=1335053&r2=1335054&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
Mon May  7 15:13:27 2012
@@ -37,9 +37,10 @@ import org.apache.cxf.transport.Destinat
 import org.apache.cxf.transport.http.HTTPConduit;
 import org.apache.cxf.transport.http_jetty.JettyHTTPDestination;
 import org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine;
-import org.junit.AfterClass;
+
+import org.junit.After;
 import org.junit.Assert;
-import org.junit.BeforeClass;
+import org.junit.Before;
 import org.junit.Test;
 import org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException;
 
@@ -49,13 +50,13 @@ public class ApplicationContextTest exte
     private static final String S1 = 
         ApplicationContextTest.class.getResource("/META-INF/cxf/cxf.xml").toString();
     
-    @BeforeClass
-    public static void classUp() {
+    @Before
+    public void setUp() {
         BusFactory.setDefaultBus(null);
     }
     
-    @AfterClass
-    public static void classDown() {
+    @After
+    public void clearBus() {
         BusFactory.setDefaultBus(null);
     }
     
@@ -83,6 +84,8 @@ public class ApplicationContextTest exte
         
         //ctx.refresh();
         checkContext(ctx);
+        ctx.close();
+        ctx.destroy();
     }
     @Test
     public void testContextWithProperties() throws Exception {
@@ -92,6 +95,8 @@ public class ApplicationContextTest exte
         TestApplicationContext ctx = new TestApplicationContext(
             new String[] {S1, s4});
         checkContext(ctx);
+        ctx.close();
+        ctx.destroy();
     }
     private void checkContext(TestApplicationContext ctx) throws Exception {
         ConfigurerImpl cfg = new ConfigurerImpl(ctx);

Modified: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties?rev=1335054&r1=1335053&r2=1335054&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
Mon May  7 15:13:27 2012
@@ -26,3 +26,4 @@ engine.port.zero.minThreads=21
 engine.port.zero.maxThreads=389
 engine.port.nine.one.minThreads=99
 engine.port.nine.one.maxThreads=777
+engine.port.nine.one.maxIdle=40000
\ No newline at end of file

Modified: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml?rev=1335054&r1=1335053&r2=1335054&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
Mon May  7 15:13:27 2012
@@ -80,7 +80,7 @@
 	      <hj:threadingParameters minThreads="${engine.port.zero.minThreads}" maxThreads="${engine.port.zero.maxThreads}"/>
 	   </hj:engine>
 	   
-	   <hj:engine port="$(engine.port.nine.one)">
+	   <hj:engine port="$(engine.port.nine.one)" maxIdleTime="$(engine.port.nine.one.maxIdle)">
 	       <hj:threadingParameters minThreads="${engine.port.nine.one.minThreads}"
 	        maxThreads="${engine.port.nine.one.maxThreads}"/>	      
 	     <hj:connector>



Mime
View raw message