From b4f1ba14133568f663da080adf644149253b5b05 Mon Sep 17 00:00:00 2001 From: Eric Yang Date: Mon, 26 Feb 2018 18:49:01 -0500 Subject: [PATCH] YARN-7963. Updated MockServiceAM unit test to prevent test hang. Contributed by Chandni Singh --- .../org/apache/hadoop/yarn/service/MockServiceAM.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/MockServiceAM.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/MockServiceAM.java index 3e1582d3f5..4373893d47 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/MockServiceAM.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/MockServiceAM.java @@ -196,7 +196,15 @@ protected AMRMClientAsync createAMRMClient() { @Override public RegisterApplicationMasterResponse registerApplicationMaster( - String appHostName, int appHostPort, String appTrackingUrl) { + String appHostName, int appHostPort, String appTrackingUrl, + Map placementConstraintsMap) throws YarnException, IOException { + return this.registerApplicationMaster(appHostName, appHostPort, + appTrackingUrl); + } + + @Override + public RegisterApplicationMasterResponse registerApplicationMaster( + String appHostName, int appHostPort, String appTrackingUrl) { RegisterApplicationMasterResponse response = mock( RegisterApplicationMasterResponse.class); when(response.getResourceTypes()).thenReturn(