From 4a0ba249595a7edd2a8ff755d2689171f62958dd Mon Sep 17 00:00:00 2001 From: Giovanni Matteo Fumarola Date: Tue, 23 Apr 2019 15:27:04 -0700 Subject: [PATCH] YARN-9491. TestApplicationMasterServiceFair#ApplicationMasterServiceTestBase.testUpdateTrackingUrl fails intermittent. Contributed by Prabhu Joseph. --- .../resourcemanager/ApplicationMasterServiceTestBase.java | 4 ++++ 1 file changed, 4 insertions(+) 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 c775bd7c38..868b4e0573 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 @@ -464,6 +464,10 @@ public void testUpdateTrackingUrl() throws Exception { allocateRequest.setTrackingUrl(newTrackingUrl); am1.allocate(allocateRequest); + + // wait until RMAppAttemptEventType.STATUS_UPDATE is handled + rm.drainEvents(); + Assert.assertEquals(newTrackingUrl, rm.getRMContext().getRMApps().get( app1.getApplicationId()).getOriginalTrackingUrl());