diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index ee57e4b036..dd61f2a96d 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -173,6 +173,9 @@ Release 2.9.0 - UNRELEASED YARN-4519. Potential deadlock of CapacityScheduler between decrease container 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 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java index a8066c131c..9e6868deb6 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java @@ -1269,7 +1269,14 @@ public void cleanUpApplicationsOnNMShutDown() { } 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