slfan1989 commented on code in PR #22028:
URL: https://github.com/apache/flink/pull/22028#discussion_r1123981772
##########
flink-yarn/src/test/java/org/apache/flink/yarn/YarnClusterDescriptorTest.java:
##########
@@ -912,4 +913,17 @@ private Map<String, String> getTestMasterEnv(
appId.toString());
}
}
+
+ @Test
+ public void testByteDesc() {
+ long bytesInMB = 1024 * 1024;
+ // 128 MB
+ assertThat(StringUtils.byteDesc(bytesInMB * 128)).isEqualTo("128 MB");
+ // 512 MB
+ assertThat(StringUtils.byteDesc(bytesInMB * 512)).isEqualTo("512 MB");
+ // 1 GB
+ assertThat(StringUtils.byteDesc(bytesInMB * 1024)).isEqualTo("1 GB");
+ // 128 GB
+ assertThat(StringUtils.byteDesc(bytesInMB * 131072)).isEqualTo("128
GB");
+ }
Review Comment:
Thank you for your suggestion!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]