From 60a3a6399018724b9bf4af7801ac486980a88474 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Mon, 10 Apr 2017 11:37:01 -0700 Subject: [PATCH] HADOOP-14293. Initialize FakeTimer with a less trivial value. (cherry picked from commit be144117a885cb39bc192279c96cbe3790dc77b1) (cherry picked from commit dab1deb9a0c96471b6da4ef95be86cbc81d55305) --- .../src/test/java/org/apache/hadoop/util/FakeTimer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 2b5f85075cf..1b17ce7cc9d 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