[42/50] [abbrv] hadoop git commit: HADOOP-14669. GenericTestUtils.waitFor should use monotonic time. Contributed by Daniel Templeton
HADOOP-14669. GenericTestUtils.waitFor should use monotonic time. Contributed by Daniel Templeton Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/df180259 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/df180259 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/df180259 Branch: refs/heads/HDFS-7240 Commit: df180259b0cc3660e199e85447c7193bee51751c Parents: 2843c68 Author: Jason Lowe Authored: Wed Jul 19 09:41:22 2017 -0500 Committer: Jason Lowe Committed: Wed Jul 19 09:41:22 2017 -0500 -- .../src/test/java/org/apache/hadoop/test/GenericTestUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/df180259/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java index 38a0c6c..9291bb0 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java @@ -356,10 +356,10 @@ public abstract class GenericTestUtils { Preconditions.checkArgument(waitForMillis >= checkEveryMillis, ERROR_INVALID_ARGUMENT); -long st = Time.now(); +long st = Time.monotonicNow(); boolean result = check.get(); -while (!result && (Time.now() - st < waitForMillis)) { +while (!result && (Time.monotonicNow() - st < waitForMillis)) { Thread.sleep(checkEveryMillis); result = check.get(); } - To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org
hadoop git commit: HADOOP-14669. GenericTestUtils.waitFor should use monotonic time. Contributed by Daniel Templeton
Repository: hadoop Updated Branches: refs/heads/branch-2 f806e8627 -> 057631c03 HADOOP-14669. GenericTestUtils.waitFor should use monotonic time. Contributed by Daniel Templeton (cherry picked from commit df180259b0cc3660e199e85447c7193bee51751c) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/057631c0 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/057631c0 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/057631c0 Branch: refs/heads/branch-2 Commit: 057631c031f40470480ba301d1c346f4a26fa5a5 Parents: f806e86 Author: Jason Lowe Authored: Wed Jul 19 09:41:22 2017 -0500 Committer: Jason Lowe Committed: Wed Jul 19 09:42:38 2017 -0500 -- .../src/test/java/org/apache/hadoop/test/GenericTestUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/057631c0/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java index 38a0c6c..9291bb0 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java @@ -356,10 +356,10 @@ public abstract class GenericTestUtils { Preconditions.checkArgument(waitForMillis >= checkEveryMillis, ERROR_INVALID_ARGUMENT); -long st = Time.now(); +long st = Time.monotonicNow(); boolean result = check.get(); -while (!result && (Time.now() - st < waitForMillis)) { +while (!result && (Time.monotonicNow() - st < waitForMillis)) { Thread.sleep(checkEveryMillis); result = check.get(); } - To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org
hadoop git commit: HADOOP-14669. GenericTestUtils.waitFor should use monotonic time. Contributed by Daniel Templeton
Repository: hadoop Updated Branches: refs/heads/trunk 2843c688b -> df180259b HADOOP-14669. GenericTestUtils.waitFor should use monotonic time. Contributed by Daniel Templeton Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/df180259 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/df180259 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/df180259 Branch: refs/heads/trunk Commit: df180259b0cc3660e199e85447c7193bee51751c Parents: 2843c68 Author: Jason Lowe Authored: Wed Jul 19 09:41:22 2017 -0500 Committer: Jason Lowe Committed: Wed Jul 19 09:41:22 2017 -0500 -- .../src/test/java/org/apache/hadoop/test/GenericTestUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/df180259/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java index 38a0c6c..9291bb0 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java @@ -356,10 +356,10 @@ public abstract class GenericTestUtils { Preconditions.checkArgument(waitForMillis >= checkEveryMillis, ERROR_INVALID_ARGUMENT); -long st = Time.now(); +long st = Time.monotonicNow(); boolean result = check.get(); -while (!result && (Time.now() - st < waitForMillis)) { +while (!result && (Time.monotonicNow() - st < waitForMillis)) { Thread.sleep(checkEveryMillis); result = check.get(); } - To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org