Modified:
trunk/connector-mxj/CHANGES
trunk/connector-mxj/src/com/mysql/management/util/ShellTest.java
trunk/connector-mxj/src/com/mysql/management/util/TestUtil.java
Log:
set test kill delay default to 10 seconds for more tolerance on slower machines
Modified: trunk/connector-mxj/CHANGES
===================================================================
--- trunk/connector-mxj/CHANGES 2008-02-20 13:35:10 UTC (rev 116)
+++ trunk/connector-mxj/CHANGES 2008-02-20 14:28:24 UTC (rev 117)
@@ -4,7 +4,7 @@
5-0-9
2008-02-19 - added robustness in tests for differences in C/J
- - set the kill-delay for tests to default to 5 seconds
+ - set the kill-delay for tests to default to 10 seconds
- added robustness in tests for differences in 'java' return codes
2008-02-18 - remove the out-of-date build targets for docs
Modified: trunk/connector-mxj/src/com/mysql/management/util/ShellTest.java
===================================================================
--- trunk/connector-mxj/src/com/mysql/management/util/ShellTest.java 2008-02-20 13:35:10 UTC (rev 116)
+++ trunk/connector-mxj/src/com/mysql/management/util/ShellTest.java 2008-02-20 14:28:24 UTC (rev 117)
@@ -99,7 +99,7 @@
assertTrue(shell.hasReturned());
int rv = shell.returnCode();
// this is _not_ a prefect test.
- // With some JVMs we get 1 others we get 0.
+ // With some JVMs we get '1', others we get '0' ....
// however if the "java" command is missing we get 127 on most unix
assertEquals("" + rv, true, rv == 1 || rv == 0);
}
Modified: trunk/connector-mxj/src/com/mysql/management/util/TestUtil.java
===================================================================
--- trunk/connector-mxj/src/com/mysql/management/util/TestUtil.java 2008-02-20 13:35:10 UTC (rev 116)
+++ trunk/connector-mxj/src/com/mysql/management/util/TestUtil.java 2008-02-20 14:28:24 UTC (rev 117)
@@ -32,19 +32,24 @@
import junit.framework.AssertionFailedError;
public class TestUtil {
+ private static int testKillDelayDefault = 10 * 1000; // Ten Seconds
+
+ private static int testMysqldPortDefault = 3336;
+
private int port;
private int testKillDelay;
public TestUtil() {
- this(new Str().parseInt(System.getProperty("c-mxj_test_port"), 3336,
- System.err));
+ this(new Str().parseInt(System.getProperty("c-mxj_test_port"),
+ testMysqldPortDefault, System.err), //
+ new Str().parseInt(System.getProperty("c-mxj_test_kill-delay"),
+ testKillDelayDefault, System.err));
}
- public TestUtil(int port) {
+ public TestUtil(int port, int testKillDelay) {
this.port = port;
- this.testKillDelay = new Str().parseInt(System
- .getProperty("c-mxj_test_kill-delay"), (5 * 1000), System.err);
+ this.testKillDelay = testKillDelay;
}
public int testPort() {
| Thread |
|---|
| • Connector/MXJ commit: r117 - in trunk/connector-mxj: . src/com/mysql/management/util | eherman | 20 Feb |