You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/04/02 17:37:37 UTC

svn commit: r1308389 - /commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java

Author: sebb
Date: Mon Apr  2 15:37:37 2012
New Revision: 1308389

URL: http://svn.apache.org/viewvc?rev=1308389&view=rev
Log:
Revert to multiplier = 1, but increase retry count.

Modified:
    commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java

Modified: commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java?rev=1308389&r1=1308388&r2=1308389&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java (original)
+++ commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java Mon Apr  2 15:37:37 2012
@@ -1067,8 +1067,8 @@ public class DefaultExecutorTest extends
 
         int start = 0;
         final int seconds = 1;
-        final int offsetMultiplier = 2;
-        final int maxRetries = 50;
+        final int offsetMultiplier = 1;
+        final int maxRetries = 180;
         int processTerminatedCounter = 0;
         int watchdogKilledProcessCounter = 0;
         CommandLine cmdLine = new CommandLine(pingScript);
@@ -1096,9 +1096,10 @@ public class DefaultExecutorTest extends
             }
         }
 
-        final long elapsedTime = System.currentTimeMillis() - startTime;
+        final long avg = (System.currentTimeMillis() - startTime) / 
+                (watchdogKilledProcessCounter+processTerminatedCounter);
         System.out.println("Processes terminated: "+processTerminatedCounter+" killed: "+watchdogKilledProcessCounter
-                +" Multiplier: "+offsetMultiplier+" MaxRetries: "+maxRetries+" Elapsed: "+elapsedTime);
+                +" Multiplier: "+offsetMultiplier+" MaxRetries: "+maxRetries+" Elapsed (avg ms): "+avg);
         assertTrue("Not a single process terminated on its own", processTerminatedCounter > 0);
         assertTrue("Not a single process was killed by the watch dog", watchdogKilledProcessCounter > 0);
     }