YARN-1784. TestContainerAllocation assumes CapacityScheduler. (Robert Kanter via kasha)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1585894 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
32bbc440c1
commit
1e1200d594
@ -65,6 +65,9 @@ Release 2.5.0 - UNRELEASED
|
||||
|
||||
YARN-1790. Fair Scheduler UI not showing apps table (bc Wong via Sandy Ryza)
|
||||
|
||||
YARN-1784. TestContainerAllocation assumes CapacityScheduler.
|
||||
(Robert Kanter via kasha)
|
||||
|
||||
Release 2.4.1 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -48,6 +48,7 @@
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainerState;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceScheduler;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.security.RMContainerTokenSecretManager;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
@ -57,9 +58,17 @@ public class TestContainerAllocation {
|
||||
|
||||
private final int GB = 1024;
|
||||
|
||||
private YarnConfiguration conf;
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
conf = new YarnConfiguration();
|
||||
conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class,
|
||||
ResourceScheduler.class);
|
||||
}
|
||||
|
||||
@Test(timeout = 3000000)
|
||||
public void testExcessReservationThanNodeManagerCapacity() throws Exception {
|
||||
YarnConfiguration conf = new YarnConfiguration();
|
||||
MockRM rm = new MockRM(conf);
|
||||
rm.start();
|
||||
|
||||
@ -129,9 +138,6 @@ public void testExcessReservationThanNodeManagerCapacity() throws Exception {
|
||||
// acquired by the AM, not when the containers are allocated
|
||||
@Test
|
||||
public void testContainerTokenGeneratedOnPullRequest() throws Exception {
|
||||
YarnConfiguration conf = new YarnConfiguration();
|
||||
conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class,
|
||||
ResourceScheduler.class);
|
||||
MockRM rm1 = new MockRM(conf);
|
||||
rm1.start();
|
||||
MockNM nm1 = rm1.registerNode("127.0.0.1:1234", 8000);
|
||||
@ -161,7 +167,6 @@ public void testContainerTokenGeneratedOnPullRequest() throws Exception {
|
||||
|
||||
@Test
|
||||
public void testNormalContainerAllocationWhenDNSUnavailable() throws Exception{
|
||||
YarnConfiguration conf = new YarnConfiguration();
|
||||
MockRM rm1 = new MockRM(conf);
|
||||
rm1.start();
|
||||
MockNM nm1 = rm1.registerNode("unknownhost:1234", 8000);
|
||||
@ -218,7 +223,6 @@ public Token createContainerToken(ContainerId containerId,
|
||||
// creation failure.
|
||||
@Test(timeout = 20000)
|
||||
public void testAMContainerAllocationWhenDNSUnavailable() throws Exception {
|
||||
final YarnConfiguration conf = new YarnConfiguration();
|
||||
MockRM rm1 = new MockRM(conf) {
|
||||
@Override
|
||||
protected RMSecretManagerService createRMSecretManagerService() {
|
||||
|
Loading…
Reference in New Issue
Block a user