From eeccd2f6f67f3eeeaa775f47a6a714ce575fcc19 Mon Sep 17 00:00:00 2001 From: Abhishek Modi Date: Sat, 31 Aug 2019 09:57:45 +0530 Subject: [PATCH] YARN-9798. ApplicationMasterServiceTestBase#testRepeatedFinishApplicationMaster fails intermittently. Contributed by Tao Yang. --- .../server/resourcemanager/ApplicationMasterServiceTestBase.java | 1 + 1 file changed, 1 insertion(+) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterServiceTestBase.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterServiceTestBase.java index 0b713e7739..80dbb8490e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterServiceTestBase.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterServiceTestBase.java @@ -382,6 +382,7 @@ protected Dispatcher createDispatcher() { for (int i = 0; i < 10; i++) { am1.unregisterAppAttempt(req, false); } + rm.drainEvents(); Assert.assertEquals("Expecting only one event", 1, dispatcher.getEventCount()); } finally {