YARN-1268. TestFairScheduer.testContinuousScheduling is flaky (Sandy Ryza)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1529529 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cae1ed9f6c
commit
54e54d45b3
|
@ -177,6 +177,8 @@ Release 2.1.2 - UNRELEASED
|
||||||
YARN-1273. Fixed Distributed-shell to account for containers that failed
|
YARN-1273. Fixed Distributed-shell to account for containers that failed
|
||||||
to start. (Hitesh Shah via vinodkv)
|
to start. (Hitesh Shah via vinodkv)
|
||||||
|
|
||||||
|
YARN-1268. TestFairScheduler.testContinuousScheduling is flaky (Sandy Ryza)
|
||||||
|
|
||||||
Release 2.1.1-beta - 2013-09-23
|
Release 2.1.1-beta - 2013-09-23
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -2279,7 +2279,7 @@ public class TestFairScheduler {
|
||||||
fs.applications, FSSchedulerApp.class);
|
fs.applications, FSSchedulerApp.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test (timeout = 5000)
|
||||||
public void testContinuousScheduling() throws Exception {
|
public void testContinuousScheduling() throws Exception {
|
||||||
// set continuous scheduling enabled
|
// set continuous scheduling enabled
|
||||||
FairScheduler fs = new FairScheduler();
|
FairScheduler fs = new FairScheduler();
|
||||||
|
@ -2315,11 +2315,13 @@ public class TestFairScheduler {
|
||||||
// at least one pass
|
// at least one pass
|
||||||
Thread.sleep(fs.getConf().getContinuousSchedulingSleepMs() + 500);
|
Thread.sleep(fs.getConf().getContinuousSchedulingSleepMs() + 500);
|
||||||
|
|
||||||
|
FSSchedulerApp app = fs.applications.get(appAttemptId);
|
||||||
|
// Wait until app gets resources.
|
||||||
|
while (app.getCurrentConsumption().equals(Resources.none())) { }
|
||||||
|
|
||||||
// check consumption
|
// check consumption
|
||||||
Resource consumption =
|
Assert.assertEquals(1024, app.getCurrentConsumption().getMemory());
|
||||||
fs.applications.get(appAttemptId).getCurrentConsumption();
|
Assert.assertEquals(1, app.getCurrentConsumption().getVirtualCores());
|
||||||
Assert.assertEquals(1024, consumption.getMemory());
|
|
||||||
Assert.assertEquals(1, consumption.getVirtualCores());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue