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

View File

@ -874,6 +874,8 @@ public void testInterAppConstraintsByAppID()
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 void testInterAppConstraintsByAppID()
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 @@ application2, createSchedulingRequest(srcTags2),
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