flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject flink git commit: [hotfix] [test-stability] Properly fail if ZooKeeperTestEnvironment cannot delete ZNodes
Date Thu, 01 Sep 2016 09:48:57 GMT
Repository: flink
Updated Branches:
  refs/heads/master 4a100fa4c -> cb89ba19b


[hotfix] [test-stability] Properly fail if ZooKeeperTestEnvironment cannot delete ZNodes


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/cb89ba19
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/cb89ba19
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/cb89ba19

Branch: refs/heads/master
Commit: cb89ba19b5ce09903498efd0ede59cea42f2eb48
Parents: 4a100fa
Author: Till Rohrmann <trohrmann@apache.org>
Authored: Thu Sep 1 11:41:10 2016 +0200
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Thu Sep 1 11:41:10 2016 +0200

----------------------------------------------------------------------
 .../flink/runtime/zookeeper/ZooKeeperTestEnvironment.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/cb89ba19/flink-runtime/src/test/java/org/apache/flink/runtime/zookeeper/ZooKeeperTestEnvironment.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/zookeeper/ZooKeeperTestEnvironment.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/zookeeper/ZooKeeperTestEnvironment.java
index 467706f..bd58515 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/zookeeper/ZooKeeperTestEnvironment.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/zookeeper/ZooKeeperTestEnvironment.java
@@ -144,18 +144,22 @@ public class ZooKeeperTestEnvironment {
 		for (int i = 0; i < maxAttempts; i++) {
 			try {
 				ZKPaths.deleteChildren(client.getZookeeperClient().getZooKeeper(), path, false);
-				break;
+				return;
 			}
 			catch (org.apache.zookeeper.KeeperException.NoNodeException e) {
 				// that seems all right. if one of the children we want to delete is
 				// actually already deleted, that's fine.
-				break;
+				return;
 			}
 			catch (KeeperException.ConnectionLossException e) {
 				// Keep retrying
 				Thread.sleep(100);
 			}
 		}
+
+		throw new Exception("Could not clear the ZNodes under " + path + ". ZooKeeper is not in
" +
+			"a clean state.");
+
 	}
 
 }


Mime
View raw message