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

[6/8] flink git commit: [FLINK-4422] [clients] Convert time interval measurements to System.nanoTime() in 'flink-clients'

[FLINK-4422] [clients] Convert time interval measurements to System.nanoTime() in 'flink-clients'

This closes #3384


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

Branch: refs/heads/master
Commit: 6b5e1f68a9b78901f0af57f446b465a7b03a88bd
Parents: 70252f3
Author: Jin Mingjian <ji...@gmail.com>
Authored: Tue Feb 21 22:43:54 2017 +0800
Committer: Stephan Ewen <se...@apache.org>
Committed: Thu Mar 16 14:43:27 2017 +0100

----------------------------------------------------------------------
 .../org/apache/flink/client/program/ClientConnectionTest.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/6b5e1f68/flink-clients/src/test/java/org/apache/flink/client/program/ClientConnectionTest.java
----------------------------------------------------------------------
diff --git a/flink-clients/src/test/java/org/apache/flink/client/program/ClientConnectionTest.java b/flink-clients/src/test/java/org/apache/flink/client/program/ClientConnectionTest.java
index 4eb5269..fc24a9d 100644
--- a/flink-clients/src/test/java/org/apache/flink/client/program/ClientConnectionTest.java
+++ b/flink-clients/src/test/java/org/apache/flink/client/program/ClientConnectionTest.java
@@ -115,13 +115,13 @@ public class ClientConnectionTest {
 
 			try {
 				// wait until the caller is successful, for at most the given time
-				long now = System.currentTimeMillis();
-				long deadline = now + MAX_DELAY;
+				long now = System.nanoTime();
+				long deadline = now + MAX_DELAY * 1_000_000;
 
 				synchronized (error) {
 					while (invoker.isAlive() && error.get() == null && now < deadline) {
 						error.wait(1000);
-						now = System.currentTimeMillis();
+						now = System.nanoTime();
 					}
 				}