Author: jfrederic.clere(a)jboss.com
Date: 2009-03-12 08:58:37 -0400 (Thu, 12 Mar 2009)
New Revision: 2354
Modified:
trunk/mod_cluster/test/java/org/jboss/mod_cluster/Maintest.java
Log:
return false if it fails.
Modified: trunk/mod_cluster/test/java/org/jboss/mod_cluster/Maintest.java
===================================================================
--- trunk/mod_cluster/test/java/org/jboss/mod_cluster/Maintest.java 2009-03-12 11:13:41
UTC (rev 2353)
+++ trunk/mod_cluster/test/java/org/jboss/mod_cluster/Maintest.java 2009-03-12 12:58:37
UTC (rev 2354)
@@ -212,13 +212,15 @@
}
return true;
}
- public static void testPort(int port) {
+ public static boolean testPort(int port) {
+ boolean ret = true;
Socket s = null;
try {
s = new Socket("localhost", port);
s.setSoLinger(true, 0);
} catch (Exception e) {
System.out.println("Can't connect to " + port);
+ ret = false;
} finally {
if (s != null) {
System.out.println("Was connected to " + port);
@@ -228,6 +230,7 @@
}
}
}
+ return ret;
}
static boolean TestForNodes(LifecycleListener lifecycle, String [] nodes) {
int countinfo = 0;