You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by ss...@apache.org on 2015/09/29 02:52:46 UTC

[2/2] tez git commit: TEZ-2858. Stop using System.currentTimeMillis in TestInputReadyTracker. (sseth) (cherry picked from commit c6f245f0f767311ad9faf4088f24c4c02c5417f2)

TEZ-2858. Stop using System.currentTimeMillis in TestInputReadyTracker. (sseth)
(cherry picked from commit c6f245f0f767311ad9faf4088f24c4c02c5417f2)

Conflicts:
	CHANGES.txt


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

Branch: refs/heads/branch-0.7
Commit: 06da29aecf8909aa853aa493f58839733b888a34
Parents: bb063c6
Author: Siddharth Seth <ss...@apache.org>
Authored: Mon Sep 28 17:49:11 2015 -0700
Committer: Siddharth Seth <ss...@apache.org>
Committed: Mon Sep 28 17:52:39 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/tez/blob/06da29ae/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 1c17702..ee3bae0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,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/06da29ae/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 {