YARN-4543. Fix random test failure in TestNodeStatusUpdater.testStopReentrant. (Akihiro Suda via rohithsharmaks)

(cherry picked from commit ac686668031ee9837deed3f3566f09f33c437870)
This commit is contained in:
Rohith Sharma K S 2016-01-29 12:29:54 +05:30
parent 0466743afb
commit b8d5df06f2
2 changed files with 11 additions and 1 deletions

View File

@ -115,6 +115,9 @@ Release 2.9.0 - UNRELEASED
YARN-4519. Potential deadlock of CapacityScheduler between decrease container YARN-4519. Potential deadlock of CapacityScheduler between decrease container
and assign containers. (Meng Ding via jianhe) and assign containers. (Meng Ding via jianhe)
YARN-4543. Fix random test failure in TestNodeStatusUpdater.testStopReentrant
(Akihiro Suda via rohithsharmaks)
Release 2.8.0 - UNRELEASED Release 2.8.0 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -1269,7 +1269,14 @@ public void cleanUpApplicationsOnNMShutDown() {
} }
Assert.assertEquals(STATE.STOPPED, nm.getServiceState()); Assert.assertEquals(STATE.STOPPED, nm.getServiceState());
Assert.assertEquals(numCleanups.get(), 1);
// It further takes a while after NM reached the STOPPED state.
waitCount = 0;
while (numCleanups.get() == 0 && waitCount++ != 20) {
LOG.info("Waiting for NM shutdown..");
Thread.sleep(1000);
}
Assert.assertEquals(1, numCleanups.get());
} }
@Test @Test