diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index d74e8a99ee..e2bf706578 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -559,6 +559,9 @@ Release 2.8.0 - UNRELEASED YARN-3745. SerializedException should also try to instantiate internal exception with the default constructor. (Lavkesh Lahngir via devaraj) + YARN-2871. TestRMRestart#testRMRestartGetApplicationList sometime fails in trunk. + (zhihai xu via xgong) + Release 2.7.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMRestart.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMRestart.java index 628e9be51f..de17acdb4c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMRestart.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMRestart.java @@ -21,6 +21,7 @@ import static org.mockito.Matchers.isA; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.timeout; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -976,9 +977,10 @@ protected RMAppManager createRMAppManager() { List appList2 = response2.getApplicationList(); Assert.assertTrue(3 == appList2.size()); - // check application summary is logged for the completed apps after RM restart. - verify(rm2.getRMAppManager(), times(3)).logApplicationSummary( - isA(ApplicationId.class)); + // check application summary is logged for the completed apps with timeout + // to make sure APP_COMPLETED events are processed, after RM restart. + verify(rm2.getRMAppManager(), timeout(1000).times(3)). + logApplicationSummary(isA(ApplicationId.class)); } private MockAM launchAM(RMApp app, MockRM rm, MockNM nm)