HADOOP-11241. Fixed intermittent TestNMSimulator failure due to timing issue. Contributed by Varun Vasudev.
This commit is contained in:
parent
1cd088fd9d
commit
260ab6d5f4
@ -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
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user