You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by sr...@apache.org on 2017/05/14 13:39:30 UTC

[6/9] flink git commit: Revert "[FLINK-6509] [tests] Perform TestingListener#waitForNewLeader under lock"

Revert "[FLINK-6509] [tests] Perform TestingListener#waitForNewLeader under lock"

This reverts commit d88a62f9c0030a35ffdec5c252c8428ab8960521.


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

Branch: refs/heads/release-1.3
Commit: cc6036fd50b243ff075ce17aef3b26680571bb14
Parents: c5efae5
Author: Stefan Richter <s....@data-artisans.com>
Authored: Sun May 14 15:37:16 2017 +0200
Committer: Stefan Richter <s....@data-artisans.com>
Committed: Sun May 14 15:37:16 2017 +0200

----------------------------------------------------------------------
 .../apache/flink/runtime/leaderelection/TestingListener.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/cc6036fd/flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/TestingListener.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/TestingListener.java b/flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/TestingListener.java
index 8571505..87decc7 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/TestingListener.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/TestingListener.java
@@ -51,11 +51,11 @@ public class TestingListener implements LeaderRetrievalListener {
 		long start = System.currentTimeMillis();
 		long curTimeout;
 
-		synchronized (lock) {
-			while (
+		while (
 				exception == null &&
-					(address == null || address.equals(oldAddress)) &&
-					(curTimeout = timeout - System.currentTimeMillis() + start) > 0) {
+				(address == null || address.equals(oldAddress)) &&
+				(curTimeout = timeout - System.currentTimeMillis() + start) > 0) {
+			synchronized (lock) {
 				try {
 					lock.wait(curTimeout);
 				} catch (InterruptedException e) {