@@ -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