From 5e2be81fcb39746c082d6a8135f8073731d63f8d Mon Sep 17 00:00:00 2001 From: Eric E Payne Date: Wed, 8 Jan 2020 19:26:01 +0000 Subject: [PATCH] YARN-7387: org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.TestIncreaseAllocationExpirer fails intermittently. Contributed by Jim Brennan (Jim_Brennan) (cherry picked from commit b1e07d27cc1a26be4e5ebd1ab7b03ef15032bef0) --- .../scheduler/capacity/TestIncreaseAllocationExpirer.java | 2 ++ 1 file changed, 2 insertions(+) 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/capacity/TestIncreaseAllocationExpirer.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestIncreaseAllocationExpirer.java index a800bef95ea..b9b8ae3fcdc 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestIncreaseAllocationExpirer.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestIncreaseAllocationExpirer.java @@ -209,6 +209,7 @@ public class TestIncreaseAllocationExpirer { Thread.sleep(10000); // Verify container size is 1G am1.allocate(null, null); + rm1.drainEvents(); Assert.assertEquals( 1 * GB, rm1.getResourceScheduler().getRMContainer(containerId2) .getAllocatedResource().getMemorySize()); @@ -433,6 +434,7 @@ public class TestIncreaseAllocationExpirer { am1.allocate(null, null); + rm1.drainEvents(); Assert.assertEquals( 2 * GB, rm1.getResourceScheduler().getRMContainer(containerId2) .getAllocatedResource().getMemorySize());