You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by pb...@apache.org on 2021/03/08 10:43:16 UTC
[hadoop] branch branch-3.3 updated: YARN-10672. All testcases in
TestReservations are flaky. Contributed by Szilard Nemeth.
This is an automated email from the ASF dual-hosted git repository.
pbacsko pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.3 by this push:
new 066f89a YARN-10672. All testcases in TestReservations are flaky. Contributed by Szilard Nemeth.
066f89a is described below
commit 066f89af019811bc3b16703f89125a10d2b2a07e
Author: Peter Bacsko <pb...@cloudera.com>
AuthorDate: Mon Mar 8 11:42:59 2021 +0100
YARN-10672. All testcases in TestReservations are flaky. Contributed by Szilard Nemeth.
---
.../server/resourcemanager/scheduler/capacity/TestReservations.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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/TestReservations.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/TestReservations.java
index a9cee2d..1168f64 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/TestReservations.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/TestReservations.java
@@ -105,7 +105,6 @@ public class TestReservations {
CapacityScheduler spyCs = new CapacityScheduler();
cs = spy(spyCs);
rmContext = TestUtils.getMockRMContext();
-
}
private void setup(CapacitySchedulerConfiguration csConf) throws Exception {
@@ -114,6 +113,9 @@ public class TestReservations {
private void setup(CapacitySchedulerConfiguration csConf,
boolean addUserLimits) throws Exception {
+ //All stub calls on the spy object of the 'cs' field should happen
+ //before cs.start() is invoked. See YARN-10672 for more details.
+ when(cs.getNumClusterNodes()).thenReturn(3);
csConf.setBoolean(CapacitySchedulerConfiguration.ENABLE_USER_METRICS, true);
final String newRoot = "root" + System.currentTimeMillis();
@@ -156,8 +158,6 @@ public class TestReservations {
cs.setRMContext(spyRMContext);
cs.init(csConf);
cs.start();
-
- when(cs.getNumClusterNodes()).thenReturn(3);
}
private static final String A = "a";
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org