You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/05/09 18:07:21 UTC

svn commit: r1336261 - in /cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring: ApplicationContextTest.java bean.properties beans-props.xml

Author: dkulp
Date: Wed May  9 16:07:20 2012
New Revision: 1336261

URL: http://svn.apache.org/viewvc?rev=1336261&view=rev
Log:
Merged revisions 1335054 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1335054 | dkulp | 2012-05-07 11:13:27 -0400 (Mon, 07 May 2012) | 2 lines

  Fix tests that fail if run in different order (required proper cleanups)

........

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

Modified: cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java?rev=1336261&r1=1336260&r2=1336261&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java (original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java Wed May  9 16:07:20 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/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties?rev=1336261&r1=1336260&r2=1336261&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties (original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties Wed May  9 16:07:20 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/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml?rev=1336261&r1=1336260&r2=1336261&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml (original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml Wed May  9 16:07:20 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>