diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index eac5ec848b..9f70a24f9b 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -1039,6 +1039,9 @@ Release 2.6.0 - UNRELEASED HADOOP-11221. IdentityHashStore assumes System.identityHashCode() is non-negative. (Jinghui Wang via szetszwo) + HADOOP-11241. Fixed intermittent TestNMSimulator failure due to timing issue. + (Varun Vasudev via zjshen) + Release 2.5.1 - 2014-09-05 INCOMPATIBLE CHANGES diff --git a/hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/nodemanager/TestNMSimulator.java b/hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/nodemanager/TestNMSimulator.java index 84be2313cf..2381549b1c 100644 --- a/hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/nodemanager/TestNMSimulator.java +++ b/hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/nodemanager/TestNMSimulator.java @@ -54,6 +54,16 @@ public void testNMSimulator() throws Exception { node1.init("rack1/node1", GB * 10, 10, 0, 1000, rm); node1.middleStep(); + int numClusterNodes = rm.getResourceScheduler().getNumClusterNodes(); + int cumulativeSleepTime = 0; + int sleepInterval = 100; + + while(numClusterNodes != 1 && cumulativeSleepTime < 5000) { + Thread.sleep(sleepInterval); + cumulativeSleepTime = cumulativeSleepTime + sleepInterval; + numClusterNodes = rm.getResourceScheduler().getNumClusterNodes(); + } + Assert.assertEquals(1, rm.getResourceScheduler().getNumClusterNodes()); Assert.assertEquals(GB * 10, rm.getResourceScheduler().getRootQueueMetrics().getAvailableMB());