hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject svn commit: r1433147 - in /hadoop/common/branches/branch-2/hadoop-yarn-project: CHANGES.txt hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java
Date Mon, 14 Jan 2013 21:36:32 GMT
Author: hitesh
Date: Mon Jan 14 21:36:32 2013
New Revision: 1433147

URL: http://svn.apache.org/viewvc?rev=1433147&view=rev
Log:
Merge -c 1433138 from trunk to branch-2 to fix YARN-330. Fix flakey test: TestNodeManagerShutdown#testKillContainersOnShutdown.
Contributed by Sandy Ryza

Modified:
    hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt?rev=1433147&r1=1433146&r2=1433147&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt Mon Jan 14 21:36:32 2013
@@ -168,6 +168,9 @@ Release 2.0.3-alpha - Unreleased
     YARN-253. Fixed container-launch to not fail when there are no local
     resources to localize. (Tom White via vinodkv)
 
+    YARN-330. Fix flakey test: TestNodeManagerShutdown#testKillContainersOnShutdown.
+    (Sandy Ryza via hitesh)
+
 Release 2.0.2-alpha - 2012-09-07 
 
     YARN-9. Rename YARN_HOME to HADOOP_YARN_HOME. (vinodkv via acmurthy)

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java?rev=1433147&r1=1433146&r2=1433147&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java
Mon Jan 14 21:36:32 2013
@@ -138,7 +138,14 @@ public class TestNodeManagerShutdown {
         containerManager.getContainerStatus(request).getStatus();
     Assert.assertEquals(ContainerState.RUNNING, containerStatus.getState());
     
-    try {Thread.sleep(5000);} catch (InterruptedException ex) {ex.printStackTrace();} 
+    final int MAX_TRIES=20;
+    int numTries = 0;
+    while (!processStartFile.exists() && numTries < MAX_TRIES) {
+      try {
+        Thread.sleep(500);
+      } catch (InterruptedException ex) {ex.printStackTrace();}
+      numTries++;
+    }
     
     nm.stop();
     
@@ -202,7 +209,7 @@ public class TestNodeManagerShutdown {
     fileWriter.write("trap \"echo $hello >> " + processStartFile + "\" SIGTERM\n");
     fileWriter.write("echo \"Writing pid to start file\"\n");
     fileWriter.write("echo $$ >> " + processStartFile + "\n");
-    fileWriter.write("while true; do\nsleep 1s;\ndone\n");
+    fileWriter.write("while true; do\ndate >> /dev/null;\n done\n");
 
     fileWriter.close();
     return scriptFile;



Mime
View raw message