tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject tez git commit: TEZ-2858. Stop using System.currentTimeMillis in TestInputReadyTracker. (sseth)
Date Tue, 29 Sep 2015 00:49:28 GMT
Repository: tez
Updated Branches:
  refs/heads/master d63d6ee60 -> c6f245f0f


TEZ-2858. Stop using System.currentTimeMillis in TestInputReadyTracker. (sseth)


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

Branch: refs/heads/master
Commit: c6f245f0f767311ad9faf4088f24c4c02c5417f2
Parents: d63d6ee
Author: Siddharth Seth <sseth@apache.org>
Authored: Mon Sep 28 17:49:11 2015 -0700
Committer: Siddharth Seth <sseth@apache.org>
Committed: Mon Sep 28 17:49:11 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 ++
 .../tez/runtime/TestInputReadyTracker.java      | 22 ++++++++++----------
 2 files changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/c6f245f0/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 07769d8..86fcff5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ Release 0.8.1: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-2858. Stop using System.currentTimeMillis in TestInputReadyTracker.
   TEZ-2857. Fix flakey tests in TestDAGImpl.
   TEZ-2836. Avoid setting framework/system counters for tasks running in threads.
   TEZ-2398. Flaky test: TestFaultTolerance
@@ -192,6 +193,7 @@ Release 0.7.1: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES
+  TEZ-2858. Stop using System.currentTimeMillis in TestInputReadyTracker.
   TEZ-2857. Fix flakey tests in TestDAGImpl.
   TEZ-2398. Flaky test: TestFaultTolerance
   TEZ-2808. Race condition between preemption and container assignment

http://git-wip-us.apache.org/repos/asf/tez/blob/c6f245f0/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestInputReadyTracker.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestInputReadyTracker.java
b/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestInputReadyTracker.java
index 49855f2..a77e38f 100644
--- a/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestInputReadyTracker.java
+++ b/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestInputReadyTracker.java
@@ -64,10 +64,10 @@ public class TestInputReadyTracker {
     assertFalse(input2.isReady);
     assertEquals(input1, readyInput);
     
-    startTime = System.currentTimeMillis();
+    startTime = System.nanoTime();
     setDelayedInputReady(input2);
     inputReadyTracker.waitForAllInputsReady(requestList);
-    readyTime = System.currentTimeMillis();
+    readyTime = System.nanoTime();
     // Should have moved into ready state - only happens when the setReady function is invoked.
     // Ensure the method returned only after the specific Input was told it is ready
     assertTrue(input2.isReady);
@@ -93,11 +93,11 @@ public class TestInputReadyTracker {
     requestList.add(input2);
     requestList.add(input3);
     
-    startTime = System.currentTimeMillis();
+    startTime = System.nanoTime();
     setDelayedInputReady(input2);
     Input readyInput = inputReadyTracker.waitForAnyInputReady(requestList);
     assertEquals(input2, readyInput);
-    readyTime = System.currentTimeMillis();
+    readyTime = System.nanoTime();
     // Should have moved into ready state - only happens when the setReady function is invoked.
     // Ensure the method returned only after the specific Input was told it is ready
     assertTrue(input2.isReady);
@@ -108,11 +108,11 @@ public class TestInputReadyTracker {
     requestList = new ArrayList<Input>();
     requestList.add(input1);
     requestList.add(input3);
-    startTime = System.currentTimeMillis();
+    startTime = System.nanoTime();
     setDelayedInputReady(input1);
     readyInput = inputReadyTracker.waitForAnyInputReady(requestList);
     assertEquals(input1, readyInput);
-    readyTime = System.currentTimeMillis();
+    readyTime = System.nanoTime();
     // Should have moved into ready state - only happens when the setReady function is invoked.
     // Ensure the method returned only after the specific Input was told it is ready
     assertTrue(input1.isReady);
@@ -122,11 +122,11 @@ public class TestInputReadyTracker {
     
     requestList = new ArrayList<Input>();
     requestList.add(input3);
-    startTime = System.currentTimeMillis();
+    startTime = System.nanoTime();
     setDelayedInputReady(input3);
     readyInput = inputReadyTracker.waitForAnyInputReady(requestList);
     assertEquals(input3, readyInput);
-    readyTime = System.currentTimeMillis();
+    readyTime = System.nanoTime();
     // Should have moved into ready state - only happens when the setReady function is invoked.
     // Ensure the method returned only after the specific Input was told it is ready
     assertTrue(input3.isReady);
@@ -185,10 +185,10 @@ public class TestInputReadyTracker {
     requestList.add(group2);
     
     
-    startTime = System.currentTimeMillis();
+    startTime = System.nanoTime();
     setDelayedInputReady(input4);
     inputReadyTracker.waitForAllInputsReady(requestList);
-    readyTime = System.currentTimeMillis();
+    readyTime = System.nanoTime();
     // Should have moved into ready state - only happens when the setReady function is invoked.
     // Ensure the method returned only after the specific Input was told it is ready
     assertTrue(group2.isReady);
@@ -199,7 +199,7 @@ public class TestInputReadyTracker {
   }
   
   private long setDelayedInputReady(final ControlledReadyInputForTest input) {
-    long startTime = System.currentTimeMillis();
+    long startTime = System.nanoTime();
     new Thread() {
       public void run() {
         try {


Mime
View raw message