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: Thanks for your suggestion! I will modify the code. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org