hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From inigo...@apache.org
Subject [35/50] [abbrv] hadoop git commit: YARN-6437. TestSignalContainer#testSignalRequestDeliveryToNM fails intermittently (Jason Lowe via Varun Saxena)
Date Fri, 07 Apr 2017 01:59:31 GMT
YARN-6437. TestSignalContainer#testSignalRequestDeliveryToNM fails intermittently (Jason Lowe
via Varun Saxena)


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

Branch: refs/heads/HDFS-10467
Commit: 04ef448c270016920d71f589a0591628d267ab05
Parents: 5528527
Author: Varun Saxena <varunsaxena@apache.org>
Authored: Thu Apr 6 01:20:41 2017 +0530
Committer: Inigo <inigoiri@apache.org>
Committed: Thu Apr 6 18:58:22 2017 -0700

----------------------------------------------------------------------
 .../server/resourcemanager/TestSignalContainer.java    | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/04ef448c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestSignalContainer.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestSignalContainer.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestSignalContainer.java
index 692924c..2688987 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestSignalContainer.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestSignalContainer.java
@@ -69,18 +69,17 @@ public class TestSignalContainer {
 
     //kick the scheduler
     nm1.nodeHeartbeat(true);
-    List<Container> conts = null;
-    int contReceived = 0;
+    List<Container> conts = new ArrayList<>(request);
     int waitCount = 0;
-    while (contReceived < request && waitCount++ < 200) {
-      LOG.info("Got " + contReceived + " containers. Waiting to get "
+    while (conts.size() < request && waitCount++ < 200) {
+      LOG.info("Got " + conts.size() + " containers. Waiting to get "
            + request);
       Thread.sleep(100);
-      conts = am.allocate(new ArrayList<ResourceRequest>(),
+      List<Container> allocation = am.allocate(new ArrayList<ResourceRequest>(),
           new ArrayList<ContainerId>()).getAllocatedContainers();
-      contReceived += conts.size();
+      conts.addAll(allocation);
     }
-    Assert.assertEquals(request, contReceived);
+    Assert.assertEquals(request, conts.size());
 
     for(Container container : conts) {
       rm.signalToContainer(container.getId(),


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message