From 1c8046d67ec10710e7749ed1929b09fac4b1ba94 Mon Sep 17 00:00:00 2001 From: Weiwei Yang Date: Tue, 23 Apr 2019 14:21:13 +0800 Subject: [PATCH] YARN-9325. TestQueueManagementDynamicEditPolicy fails intermittent. Contributed by Prabhu Joseph. --- .../capacity/TestQueueManagementDynamicEditPolicy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/TestQueueManagementDynamicEditPolicy.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/TestQueueManagementDynamicEditPolicy.java index 66b488db275..733f0417157 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/TestQueueManagementDynamicEditPolicy.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/TestQueueManagementDynamicEditPolicy.java @@ -118,7 +118,7 @@ public class TestQueueManagementDynamicEditPolicy extends nodeLabel, int timesec) throws InterruptedException { long start = System.currentTimeMillis(); while (System.currentTimeMillis() - start < timesec * 1000) { - if (Float.compare(expectedVal, queueManagementPolicy + if (Math.abs(expectedVal - queueManagementPolicy .getAbsoluteActivatedChildQueueCapacity(nodeLabel)) > EPSILON) { Thread.sleep(100); } else {