Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Prevent test for looping forever.

  • Loading branch information...
commit 7b05940b7ddfb98ebee9c7e49175a285d5164fde 1 parent 3066b0e
@jfclere jfclere authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 test/java/src/test/java/org/jboss/mod_cluster/TestHang.java
View
9 test/java/src/test/java/org/jboss/mod_cluster/TestHang.java
@@ -69,7 +69,7 @@ public void testHang() {
String result = null;
try {
// read the INFO message
- int count = 0;
+ int count = 0;
while (((result = control.getProxyInfo()) == null) && count <= 10) {
try {
Thread me = Thread.currentThread();
@@ -83,14 +83,19 @@ public void testHang() {
String [] nodes = new String[1];
nodes[0] = "node1";
- while (!Maintest.checkProxyInfo(result, nodes)) {
+ count = 0;
+ while (!Maintest.checkProxyInfo(result, nodes) && count <= 10) {
try {
Thread me = Thread.currentThread();
me.sleep(5000);
} catch (Exception ex) {
}
result = control.getProxyInfo();
+ count++;
}
+ if (count==10)
+ fail("can't checkProxyInfo");
+
} catch (Exception ex) {
ex.printStackTrace();
fail("can't find node1 running");
Please sign in to comment.
Something went wrong with that request. Please try again.