|
@@ -67,7 +67,7 @@ public class TestSingleConstraintAppPlacementAllocator {
|
|
|
TestUtils.getMockApplicationId(1));
|
|
|
when(appSchedulingInfo.getApplicationAttemptId()).thenReturn(
|
|
|
TestUtils.getMockApplicationAttemptId(1, 1));
|
|
|
-
|
|
|
+ when(appSchedulingInfo.getDefaultNodeLabelExpression()).thenReturn("y");
|
|
|
// stub RMContext
|
|
|
rmContext = TestUtils.getMockRMContext();
|
|
|
|
|
@@ -153,7 +153,8 @@ public class TestSingleConstraintAppPlacementAllocator {
|
|
|
.resourceSizing(
|
|
|
ResourceSizing.newInstance(1, Resource.newInstance(1024, 1)))
|
|
|
.build());
|
|
|
- Assert.assertEquals("", allocator.getTargetNodePartition());
|
|
|
+ // Node partition is unspecified, use the default node label expression y
|
|
|
+ Assert.assertEquals("y", allocator.getTargetNodePartition());
|
|
|
|
|
|
// Valid (with application Id target)
|
|
|
assertValidSchedulingRequest(SchedulingRequest.newBuilder().executionType(
|
|
@@ -167,7 +168,7 @@ public class TestSingleConstraintAppPlacementAllocator {
|
|
|
ResourceSizing.newInstance(1, Resource.newInstance(1024, 1)))
|
|
|
.build());
|
|
|
// Allocation tags should not include application Id
|
|
|
- Assert.assertEquals("", allocator.getTargetNodePartition());
|
|
|
+ Assert.assertEquals("y", allocator.getTargetNodePartition());
|
|
|
|
|
|
// Invalid (without sizing)
|
|
|
assertInvalidSchedulingRequest(SchedulingRequest.newBuilder().executionType(
|