Skip to content

Commit cbffada

Browse files
Trigger CI tests
1 parent 69c96a8 commit cbffada

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

hadoop-ozone/cli-admin/src/test/java/org/apache/hadoop/hdds/scm/cli/datanode/TestContainerBalancerSubCommand.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,22 @@ private void mockStartContainerBalancerSuccess(ScmClient scmClient) throws IOExc
474474
.thenReturn(startBalancerSuccessResponse());
475475
}
476476

477+
@Test
478+
void testStartSubcommandMaxDatanodesPercentageKebabCaseFlag() throws IOException {
479+
ScmClient scmClient = mock(ScmClient.class);
480+
mockStartContainerBalancerSuccess(scmClient);
481+
482+
CommandLine cmd = new CommandLine(startCmd);
483+
cmd.parseArgs("--max-datanodes-percentage-to-involve-per-iteration", "30");
484+
startCmd.execute(scmClient);
485+
486+
assertThat(out.get()).containsPattern(STARTED_SUCCESSFULLY);
487+
assertThat(err.get()).doesNotContain("maxDatanodesPercentageToInvolvePerIteration");
488+
verify(scmClient).startContainerBalancer(
489+
eq(Optional.empty()), eq(Optional.empty()), eq(Optional.of(30)),
490+
any(), any(), any(), any(), any(), any(), any(), any(), any(), any(), any());
491+
}
492+
477493
@Test
478494
void testStartSubcommandHelpDoesNotShowDeprecatedFlags() {
479495
CommandLine cmd = new CommandLine(startCmd);
@@ -491,22 +507,6 @@ void testStartSubcommandHelpDoesNotShowDeprecatedFlags() {
491507
.doesNotContain("maxSizeLeavingSourceInGB");
492508
}
493509

494-
@Test
495-
void testStartSubcommandMaxDatanodesPercentageKebabCaseFlag() throws IOException {
496-
ScmClient scmClient = mock(ScmClient.class);
497-
mockStartContainerBalancerSuccess(scmClient);
498-
499-
CommandLine cmd = new CommandLine(startCmd);
500-
cmd.parseArgs("--max-datanodes-percentage-to-involve-per-iteration", "30");
501-
startCmd.execute(scmClient);
502-
503-
assertThat(out.get()).containsPattern(STARTED_SUCCESSFULLY);
504-
assertThat(err.get()).doesNotContain("maxDatanodesPercentageToInvolvePerIteration");
505-
verify(scmClient).startContainerBalancer(
506-
eq(Optional.empty()), eq(Optional.empty()), eq(Optional.of(30)),
507-
any(), any(), any(), any(), any(), any(), any(), any(), any(), any(), any());
508-
}
509-
510510
@Test
511511
void testStartSubcommandMaxDatanodesPercentageShortFlag() throws IOException {
512512
ScmClient scmClient = mock(ScmClient.class);

0 commit comments

Comments
 (0)