You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ph...@apache.org on 2011/06/22 21:47:19 UTC
svn commit: r1138597 -
/zookeeper/branches/branch-3.3/src/java/test/org/apache/zookeeper/test/QuorumTest.java
Author: phunt
Date: Wed Jun 22 19:47:19 2011
New Revision: 1138597
URL: http://svn.apache.org/viewvc?rev=1138597&view=rev
Log:
Fixed a problem introduced by the first patch for ZOOKEEPER-1103 (phunt)
Modified:
zookeeper/branches/branch-3.3/src/java/test/org/apache/zookeeper/test/QuorumTest.java
Modified: zookeeper/branches/branch-3.3/src/java/test/org/apache/zookeeper/test/QuorumTest.java
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.3/src/java/test/org/apache/zookeeper/test/QuorumTest.java?rev=1138597&r1=1138596&r2=1138597&view=diff
==============================================================================
--- zookeeper/branches/branch-3.3/src/java/test/org/apache/zookeeper/test/QuorumTest.java (original)
+++ zookeeper/branches/branch-3.3/src/java/test/org/apache/zookeeper/test/QuorumTest.java Wed Jun 22 19:47:19 2011
@@ -291,19 +291,22 @@ public class QuorumTest extends QuorumBa
CONNECTION_TIMEOUT));
+ boolean success = false;
for (int i = 0; i < 30; i++) {
try {
zk.create("/test", "test".getBytes(), ZooDefs.Ids.OPEN_ACL_UNSAFE,
CreateMode.PERSISTENT);
+ success = true;
break;
} catch(KeeperException.ConnectionLossException e) {
Thread.sleep(1000);
}
+ }
+ if (!success) {
// test fails if we still can't connect to the quorum after 30 seconds.
- assertFalse("client could not connect to reestablished quorum: giving up after 30 seconds.",true);
+ fail("client could not connect to reestablished quorum: giving up after 30+ seconds.");
}
-
zk.close();
}