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/constraint/TestPlacementConstraintsUtil.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/TestPlacementConstraintsUtil.java index 5dbdc8a1b94..2aa9971b675 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/TestPlacementConstraintsUtil.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/TestPlacementConstraintsUtil.java @@ -874,6 +874,8 @@ public class TestPlacementConstraintsUtil { long ts = System.currentTimeMillis(); ApplicationId application1 = BuilderUtils.newApplicationId(ts, 123); + ApplicationId application2 = BuilderUtils.newApplicationId(ts, 124); + ApplicationId application3 = BuilderUtils.newApplicationId(ts, 125); // Register App1 with anti-affinity constraint map. RMNode n0r1 = rmNodes.get(0); @@ -917,8 +919,6 @@ public class TestPlacementConstraintsUtil { srcTags2.add("app2"); constraintMap.put(srcTags2, constraint2); - ts = System.currentTimeMillis(); - ApplicationId application2 = BuilderUtils.newApplicationId(ts, 124); pcm.registerApplication(application2, constraintMap); // Anti-affinity with app1/hbase-m so it should not be able to be placed @@ -947,10 +947,7 @@ public class TestPlacementConstraintsUtil { srcTags3.add("app3"); constraintMap.put(srcTags3, constraint3); - ts = System.currentTimeMillis(); - ApplicationId application3 = BuilderUtils.newApplicationId(ts, 124); pcm.registerApplication(application3, constraintMap); - /** * Place container: * n0: app1/hbase-m(1), app3/hbase-m