demery-pivotal commented on code in PR #7585:
URL: https://github.com/apache/geode/pull/7585#discussion_r849740759
##########
geode-gfsh/src/integrationTest/java/org/apache/geode/management/internal/cli/commands/StartMemberUtilsTest.java:
##########
@@ -151,77 +163,82 @@ public void testExtensionsJars() throws IOException {
assertThat(gemfireClasspath).doesNotContain("extensions");
// when there is a `test.jar` in `extensions` directory
- File folder = temporaryFolder.newFolder("extensions");
+ File folder = new File(temporaryFolder, "extensions");
+ Files.createDirectories(folder.toPath());
File jarFile = new File(folder, "test.jar");
- jarFile.createNewFile();
+ assertThat(jarFile.createNewFile()).isTrue();
gemfireClasspath = StartMemberUtils.toClasspath(true, new String[]
{jarFile.getAbsolutePath()});
assertThat(gemfireClasspath).contains(jarFile.getName());
}
+ @EnabledForJreRange(max = JAVA_13)
@Test
- public void testAddMaxHeap() {
+ public void testAddMaxHeapWithCMS() {
List<String> baseCommandLine = new ArrayList<>();
// Empty Max Heap Option
StartMemberUtils.addMaxHeap(baseCommandLine, null);
- assertThat(baseCommandLine.size()).isEqualTo(0);
+ assertThat(baseCommandLine).isEmpty();
StartMemberUtils.addMaxHeap(baseCommandLine, "");
- assertThat(baseCommandLine.size()).isEqualTo(0);
+ assertThat(baseCommandLine).isEmpty();
// Only Max Heap Option Set
StartMemberUtils.addMaxHeap(baseCommandLine, "32g");
- assertThat(baseCommandLine.size()).isEqualTo(3);
assertThat(baseCommandLine).containsExactly("-Xmx32g",
"-XX:+UseConcMarkSweepGC",
- "-XX:CMSInitiatingOccupancyFraction=" +
StartMemberUtils.CMS_INITIAL_OCCUPANCY_FRACTION);
+ "-XX:CMSInitiatingOccupancyFraction=" +
MemberJvmOptions.CMS_INITIAL_OCCUPANCY_FRACTION);
Review Comment:
If we don't care about the specific order, consider relaxing the assertion
slightly (and the other assertions of multiple options):
`containsExactlyInAnyOrder(…)`.
--
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]