cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From egl...@apache.org
Subject svn commit: r748174 - in /cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing: GreeterImpl.java MAPTest.java
Date Thu, 26 Feb 2009 15:12:18 GMT
Author: eglynn
Date: Thu Feb 26 15:12:18 2009
New Revision: 748174

URL: http://svn.apache.org/viewvc?rev=748174&view=rev
Log:
Tightening up MAPTest.testFallbackThreadPoolConfig

Modified:
    cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java
    cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java

Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java?rev=748174&r1=748173&r2=748174&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java
(original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java
Thu Feb 26 15:12:18 2009
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.systest.ws.addressing;
 
+import java.util.Date;
 import java.util.concurrent.Future;
 
 import javax.annotation.Resource;
@@ -66,7 +67,9 @@
     }
 
     public String greetMeLater(long delay) {
-        System.out.println("\n\n*** GreetMeLater called with: " + delay + "***\n\n");
+        System.out.println("\n\n*** GreetMeLater called with: " + delay
+                           + " at: " + new Date().toString()
+                           + "***\n\n");
         if (delay > 0) {
             try {
                 Thread.sleep(delay);

Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java?rev=748174&r1=748173&r2=748174&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java
(original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java
Thu Feb 26 15:12:18 2009
@@ -70,20 +70,22 @@
     public void testFallbackThreadPoolConfig() throws Exception { 
         Runnable r = new Runnable() {
             public void run() {
-                greeter.greetMeLater(10 * 1000);
+                greeter.greetMeLater(5 * 1000);
             }
         };
-        Thread[] invokers = new Thread[4];
+        Thread[] invokers = new Thread[5];
         long start = System.currentTimeMillis();
         for (int i = 0; i < invokers.length; i++) {
             invokers[i] = new Thread(r);
+            invokers[i].setDaemon(true);
             invokers[i].start();
         }
         for (int i = 0; i < invokers.length; i++) {
-            invokers[i].join();
+            invokers[i].join(15 * 1000);
         }
         long end = System.currentTimeMillis();
-        assertTrue(end - start > 20 * 1000L);
+        assertTrue("unexpected duration: " + (end - start),
+                   end - start > 9 * 1000L);
     }
 
 }



Mime
View raw message