From 15d82fcb750450777634e3b7599e527bd8239221 Mon Sep 17 00:00:00 2001 From: Weiwei Yang Date: Wed, 3 Jul 2019 12:08:45 +0800 Subject: [PATCH] YARN-9658. Fix UT failures in TestLeafQueue. Contributed by Tao Yang. --- .../server/resourcemanager/scheduler/capacity/TestLeafQueue.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/scheduler/capacity/TestLeafQueue.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestLeafQueue.java index 29fe14245e..6a4391ab21 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestLeafQueue.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestLeafQueue.java @@ -177,6 +177,7 @@ private void setUpInternal(ResourceCalculator rC) throws Exception { setupQueueConfiguration(csConf, newRoot); YarnConfiguration conf = new YarnConfiguration(); cs.setConf(conf); + when(spyRMContext.getYarnConfiguration()).thenReturn(conf); csContext = mock(CapacitySchedulerContext.class); when(csContext.getConfiguration()).thenReturn(csConf);