Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ccm: Make 'opts' parameter of the 'stop' method be optional #1234

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions scylla/tests/ccm_integration/ccm/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ impl NodeStartOptions {
/// Options to stop the node with.
/// It allows to control the value of `--no-wait` and `--not-gently` ccm options.
#[allow(dead_code)]
#[derive(Default)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both booleans will be set to false. This is expected, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, the same as in the new is expected.

pub(crate) struct NodeStopOptions {
/// Dont't wait for the node to properly stop.
no_wait: bool,
Expand Down Expand Up @@ -295,7 +296,7 @@ impl Node {
Ok(())
}

pub(crate) async fn stop(&mut self, opts: NodeStopOptions) -> Result<(), Error> {
pub(crate) async fn stop(&mut self, opts: Option<NodeStopOptions>) -> Result<(), Error> {
let mut args: Vec<String> = vec![
self.opts.name(),
"stop".to_string(),
Expand All @@ -306,7 +307,7 @@ impl Node {
let NodeStopOptions {
no_wait,
not_gently,
} = opts;
} = opts.unwrap_or_default();
if no_wait {
args.push(NodeStopOptions::NO_WAIT.to_string());
}
Expand Down
Loading