hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject hadoop git commit: YARN-1537. Fix race condition in TestLocalResourcesTrackerImpl.testLocalResourceCache. Contributed by Xuan Gong.
Date Fri, 06 Feb 2015 07:58:59 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 18b2507ed -> 02f154a00


YARN-1537. Fix race condition in TestLocalResourcesTrackerImpl.testLocalResourceCache. Contributed
by Xuan Gong.


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

Branch: refs/heads/trunk
Commit: 02f154a0016b7321bbe5b09f2da44a9b33797c36
Parents: 18b2507
Author: Arun C. Murthy <acmurthy@apache.org>
Authored: Thu Feb 5 23:58:52 2015 -0800
Committer: Arun C. Murthy <acmurthy@apache.org>
Committed: Thu Feb 5 23:58:52 2015 -0800

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                                 | 3 +++
 .../localizer/TestLocalResourcesTrackerImpl.java                | 5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/02f154a0/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index fa0d8ab..0da4c33 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -498,6 +498,9 @@ Release 2.7.0 - UNRELEASED
     YARN-3145. Fixed ConcurrentModificationException on CapacityScheduler
     ParentQueue#getQueueUserAclInfo. (Tsuyoshi OZAWA via jianhe)
 
+    YARN-1537. Fix race condition in
+    TestLocalResourcesTrackerImpl.testLocalResourceCache. (xgong via acmurthy)
+
 Release 2.6.0 - 2014-11-18
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/02f154a0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/TestLocalResourcesTrackerImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/TestLocalResourcesTrackerImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/TestLocalResourcesTrackerImpl.java
index 23a57d6..5695254 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/TestLocalResourcesTrackerImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/TestLocalResourcesTrackerImpl.java
@@ -24,6 +24,7 @@ import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.timeout;
 
 import java.io.File;
 import java.io.IOException;
@@ -313,7 +314,7 @@ public class TestLocalResourcesTrackerImpl {
       // After receiving failed resource event; all waiting containers will be
       // notified with Container Resource Failed Event.
       Assert.assertEquals(0, localrsrc.size());
-      verify(containerEventHandler, times(2)).handle(
+      verify(containerEventHandler, timeout(1000).times(2)).handle(
         isA(ContainerResourceFailedEvent.class));
       Assert.assertEquals(ResourceState.FAILED, localizedResource.getState());
 
@@ -360,7 +361,7 @@ public class TestLocalResourcesTrackerImpl {
       dispatcher.await();
       
       // Verifying ContainerResourceLocalizedEvent .
-      verify(containerEventHandler, times(1)).handle(
+      verify(containerEventHandler, timeout(1000).times(1)).handle(
         isA(ContainerResourceLocalizedEvent.class));
       Assert.assertEquals(ResourceState.LOCALIZED, localrsrc.get(lr)
         .getState());


Mime
View raw message