Skip to content

Commit

Permalink
HDDS-10510. Improve user experience with containerbalancer CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
sarvekshayr committed Mar 25, 2024
1 parent 91af26a commit ff78f9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
public class ContainerBalancerStopSubcommand extends ScmSubcommand {
@Override
public void execute(ScmClient scmClient) throws IOException {
System.out.println("ContainerBalancer is in stopping state. Waiting for current iteration to finish");
scmClient.stopContainerBalancer();
System.out.println("Stopping ContainerBalancer...");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ public void testContainerBalancerStopSubcommand() throws IOException {
ScmClient scmClient = mock(ScmClient.class);
stopCmd.execute(scmClient);

Pattern p = Pattern.compile("^Stopping\\sContainerBalancer...");
Pattern p = Pattern.compile("^ContainerBalancer\\sis\\sin\\sstopping\\sstate." +
"\\sWaiting\\sfor\\scurrent\\siteration\\sto\\sfinish\\n" +
"Stopping\\sContainerBalancer...");
Matcher m = p.matcher(outContent.toString(DEFAULT_ENCODING));
assertTrue(m.find());
}
Expand Down

0 comments on commit ff78f9a

Please sign in to comment.