From 53959e69f7ef4442324627fbfb159012968a2092 Mon Sep 17 00:00:00 2001 From: Tsuyoshi Ozawa Date: Mon, 6 Apr 2015 20:13:21 +0900 Subject: [PATCH] TestFairScheduler.testContinuousScheduling fails Intermittently. Contributed by Zhihai Xu. --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../resourcemanager/scheduler/fair/TestFairScheduler.java | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index b1f89132fe1..695c4a6a326 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -145,6 +145,9 @@ Release 2.8.0 - UNRELEASED YARN-3435. AM container to be allocated Appattempt AM container shown as null. (Bibin A Chundatt via xgong) + YARN-2666. TestFairScheduler.testContinuousScheduling fails Intermittently. + (Zhihai Xu via ozawa) + Release 2.7.0 - UNRELEASED INCOMPATIBLE CHANGES 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/fair/TestFairScheduler.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/TestFairScheduler.java index b5bfb8c6145..98877e7cb8b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/TestFairScheduler.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/TestFairScheduler.java @@ -3922,12 +3922,9 @@ public class TestFairScheduler extends FairSchedulerTestBase { createResourceRequest(1024, 1, ResourceRequest.ANY, 2, 1, true); ask.clear(); ask.add(request); + scheduler.stop(); scheduler.allocate(appAttemptId, ask, new ArrayList(), null, null); - - // Wait until app gets resources - while (app.getCurrentConsumption() - .equals(Resources.createResource(1024, 1))) { } - + scheduler.continuousSchedulingAttempt(); Assert.assertEquals(2048, app.getCurrentConsumption().getMemory()); Assert.assertEquals(2, app.getCurrentConsumption().getVirtualCores());