Repository: hadoop
Updated Branches:
  refs/heads/branch-2 2dae9299e -> dab1deb9a


HADOOP-14293. Initialize FakeTimer with a less trivial value.

(cherry picked from commit be144117a885cb39bc192279c96cbe3790dc77b1)


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

Branch: refs/heads/branch-2
Commit: dab1deb9a0c96471b6da4ef95be86cbc81d55305
Parents: 2dae929
Author: Andrew Wang <[email protected]>
Authored: Mon Apr 10 11:37:01 2017 -0700
Committer: Andrew Wang <[email protected]>
Committed: Mon Apr 10 11:37:31 2017 -0700

----------------------------------------------------------------------
 .../src/test/java/org/apache/hadoop/util/FakeTimer.java           | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/dab1deb9/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/FakeTimer.java
----------------------------------------------------------------------
diff --git 
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/FakeTimer.java
 
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/FakeTimer.java
index 2b5f850..1b17ce7 100644
--- 
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/FakeTimer.java
+++ 
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/FakeTimer.java
@@ -33,7 +33,8 @@ public class FakeTimer extends Timer {
 
   /** Constructs a FakeTimer with a non-zero value */
   public FakeTimer() {
-    nowNanos = 1000;  // Initialize with a non-trivial value.
+    // Initialize with a non-trivial value.
+    nowNanos = TimeUnit.MILLISECONDS.toNanos(1000);
   }
 
   @Override


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to