List:Commits« Previous MessageNext Message »
From:mmatthews Date:January 18 2006 4:50pm
Subject:Connector/J commit: r4820 - in branches/branch_3_1/connector-j/src/testsuite: regression simple
View as plain text  
Modified:
   branches/branch_3_1/connector-j/src/testsuite/regression/ConnectionRegressionTest.java
   branches/branch_3_1/connector-j/src/testsuite/simple/ConnectionTest.java
Log:
Allow dotted-quad and IPv6 addresses in tests that re-build URLs to test connection failover.

Modified: branches/branch_3_1/connector-j/src/testsuite/regression/ConnectionRegressionTest.java
===================================================================
--- branches/branch_3_1/connector-j/src/testsuite/regression/ConnectionRegressionTest.java	2006-01-18 16:49:17 UTC (rev 4819)
+++ branches/branch_3_1/connector-j/src/testsuite/regression/ConnectionRegressionTest.java	2006-01-18 16:50:04 UTC (rev 4820)
@@ -565,7 +565,9 @@
 		if (st.hasMoreTokens()) {
 			String possibleHostOrPort = st.nextToken();
 
-			if (Character.isDigit(possibleHostOrPort.charAt(0))) {
+			if (Character.isDigit(possibleHostOrPort.charAt(0)) && 
+					(possibleHostOrPort.indexOf(".") == -1 /* IPV4 */)  &&
+					(possibleHostOrPort.indexOf("::") == -1 /* IPV6 */)) {
 				port = possibleHostOrPort;
 				host = "localhost";
 			} else {

Modified: branches/branch_3_1/connector-j/src/testsuite/simple/ConnectionTest.java
===================================================================
--- branches/branch_3_1/connector-j/src/testsuite/simple/ConnectionTest.java	2006-01-18 16:49:17 UTC (rev 4819)
+++ branches/branch_3_1/connector-j/src/testsuite/simple/ConnectionTest.java	2006-01-18 16:50:04 UTC (rev 4820)
@@ -913,7 +913,9 @@
 		if (st.hasMoreTokens()) {
 			String possibleHostOrPort = st.nextToken();
 
-			if (Character.isDigit(possibleHostOrPort.charAt(0))) {
+			if (Character.isDigit(possibleHostOrPort.charAt(0)) && 
+					(possibleHostOrPort.indexOf(".") == -1 /* IPV4 */)  &&
+					(possibleHostOrPort.indexOf("::") == -1 /* IPV6 */)) {
 				port = possibleHostOrPort;
 				host = "localhost";
 			} else {

Thread
Connector/J commit: r4820 - in branches/branch_3_1/connector-j/src/testsuite: regression simplemmatthews18 Jan