YARN-9316. TestPlacementConstraintsUtil#testInterAppConstraintsByAppID fails intermittently. Contributed by Prabhu Joseph.

This commit is contained in:
Weiwei Yang 2019-02-24 22:42:27 +08:00
parent 50094d7fef
commit 9cd5c5447f
1 changed files with 2 additions and 5 deletions

View File

@ -874,6 +874,8 @@ public class TestPlacementConstraintsUtil {
long ts = System.currentTimeMillis(); long ts = System.currentTimeMillis();
ApplicationId application1 = BuilderUtils.newApplicationId(ts, 123); 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. // Register App1 with anti-affinity constraint map.
RMNode n0r1 = rmNodes.get(0); RMNode n0r1 = rmNodes.get(0);
@ -917,8 +919,6 @@ public class TestPlacementConstraintsUtil {
srcTags2.add("app2"); srcTags2.add("app2");
constraintMap.put(srcTags2, constraint2); constraintMap.put(srcTags2, constraint2);
ts = System.currentTimeMillis();
ApplicationId application2 = BuilderUtils.newApplicationId(ts, 124);
pcm.registerApplication(application2, constraintMap); pcm.registerApplication(application2, constraintMap);
// Anti-affinity with app1/hbase-m so it should not be able to be placed // 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"); srcTags3.add("app3");
constraintMap.put(srcTags3, constraint3); constraintMap.put(srcTags3, constraint3);
ts = System.currentTimeMillis();
ApplicationId application3 = BuilderUtils.newApplicationId(ts, 124);
pcm.registerApplication(application3, constraintMap); pcm.registerApplication(application3, constraintMap);
/** /**
* Place container: * Place container:
* n0: app1/hbase-m(1), app3/hbase-m * n0: app1/hbase-m(1), app3/hbase-m