YARN-10515. Fix flaky test TestCapacitySchedulerAutoQueueCreation.testDynamicAutoQueueCreationWithTags. Contributed by Peter Bacsko

(cherry picked from commit 8620984b8d)
This commit is contained in:
Szilard Nemeth 2021-01-21 20:58:57 +01:00 committed by Akira Ajisaka
parent 0f12f3e125
commit 3303aa5947
No known key found for this signature in database
GPG Key ID: C1EDBB9CA400FD50
1 changed files with 2 additions and 0 deletions

View File

@ -52,6 +52,7 @@ import org.apache.hadoop.yarn.server.resourcemanager.placement.QueueMapping.Queu
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEventType; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEventType;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ContainerUpdates; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ContainerUpdates;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.QueueMetrics;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler import org.apache.hadoop.yarn.server.resourcemanager.scheduler
.ResourceScheduler; .ResourceScheduler;
@ -201,6 +202,7 @@ public class TestCapacitySchedulerAutoCreatedQueueBase {
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
QueueMetrics.clearQueueMetrics();
CapacitySchedulerConfiguration conf = setupSchedulerConfiguration(); CapacitySchedulerConfiguration conf = setupSchedulerConfiguration();
setupQueueConfiguration(conf); setupQueueConfiguration(conf);
conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class, conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class,