Skip to content

Commit b04ead4

Browse files
committed
YARN-11511 Improve TestRMWebServices test config and data
fix by review
1 parent d2f3fb8 commit b04ead4

File tree

1 file changed

+5
-4
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp

1 file changed

+5
-4
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestWebServiceUtil.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767

6868
import static org.apache.hadoop.yarn.conf.YarnConfiguration.MEMORY_CONFIGURATION_STORE;
6969
import static org.apache.hadoop.yarn.conf.YarnConfiguration.SCHEDULER_CONFIGURATION_STORE_CLASS;
70+
import static org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerTestUtilities.GB;
7071
import static org.junit.Assert.assertEquals;
7172

7273
public final class TestWebServiceUtil {
@@ -96,14 +97,14 @@ public static void runTest(String template, String name,
9697
final boolean reinitAfterNodeChane = isMutableConfig(rm.getConfig());
9798
try {
9899
assertJsonResponse(sendRequest(resource), String.format(template, name, 0));
99-
MockNM nm1 = rm.registerNode("h1:1234", 8192, 8);
100-
rm.registerNode("h2:1234", 8192, 8);
100+
MockNM nm1 = rm.registerNode("h1:1234", 8 * GB, 8);
101+
rm.registerNode("h2:1234", 8 * GB, 8);
101102
if (reinitAfterNodeChane) {
102103
reinitialize(rm, rm.getConfig());
103104
}
104105
assertJsonResponse(sendRequest(resource), String.format(template, name, 16));
105-
rm.registerNode("h3:1234", 8192, 8);
106-
MockNM nm4 = rm.registerNode("h4:1234", 8192, 8);
106+
rm.registerNode("h3:1234", 8 * GB, 8);
107+
MockNM nm4 = rm.registerNode("h4:1234", 8 * GB, 8);
107108
if (reinitAfterNodeChane) {
108109
reinitialize(rm, rm.getConfig());
109110
}

0 commit comments

Comments
 (0)