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:17:46 UTC
svn commit: r1308381 -
/commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java
Author: sebb
Date: Mon Apr 2 15:17:46 2012
New Revision: 1308381
URL: http://svn.apache.org/viewvc?rev=1308381&view=rev
Log:
Still trying to get settings right
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=1308381&r1=1308380&r2=1308381&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:17:46 2012
@@ -1067,13 +1067,14 @@ public class DefaultExecutorTest extends
int start = 0;
final int seconds = 1;
- final int offsetMultiplier = 3;
+ final int offsetMultiplier = 2;
final int maxRetries = 50;
int processTerminatedCounter = 0;
int watchdogKilledProcessCounter = 0;
CommandLine cmdLine = new CommandLine(pingScript);
cmdLine.addArgument(Integer.toString(seconds + 1)); // need to add "1" to wait the requested number of seconds
+ final long startTime = System.currentTimeMillis();
for (int offset = start; offset <= maxRetries; offset++) {
// wait progressively longer for process to complete
// tricky to get this test right. We want to try and catch the process while it is terminating,
@@ -1095,8 +1096,9 @@ public class DefaultExecutorTest extends
}
}
+ final long elapsedTime = System.currentTimeMillis() - startTime;
System.out.println("Processes terminated: "+processTerminatedCounter+" killed: "+watchdogKilledProcessCounter
- +" Multiplier: "+offsetMultiplier+" MaxRetries: "+maxRetries);
+ +" Multiplier: "+offsetMultiplier+" MaxRetries: "+maxRetries+" Elapsed: "+elapsedTime);
assertTrue("Not a single process terminated on its own", processTerminatedCounter > 0);
assertTrue("Not a single process was killed by the watch dog", watchdogKilledProcessCounter > 0);
}