Skip to content

Commit c839847

Browse files
authored
Merge pull request #1234 from vponomaryov/ccm-make-stop-op-have-default
ccm: Make 'opts' parameter of the 'stop' method be optional
2 parents 8a29378 + 7d9b25f commit c839847

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scylla/tests/ccm_integration/ccm/cluster.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ impl NodeStartOptions {
174174
/// Options to stop the node with.
175175
/// It allows to control the value of `--no-wait` and `--not-gently` ccm options.
176176
#[allow(dead_code)]
177+
#[derive(Default)]
177178
pub(crate) struct NodeStopOptions {
178179
/// Dont't wait for the node to properly stop.
179180
no_wait: bool,
@@ -295,7 +296,7 @@ impl Node {
295296
Ok(())
296297
}
297298

298-
pub(crate) async fn stop(&mut self, opts: NodeStopOptions) -> Result<(), Error> {
299+
pub(crate) async fn stop(&mut self, opts: Option<NodeStopOptions>) -> Result<(), Error> {
299300
let mut args: Vec<String> = vec![
300301
self.opts.name(),
301302
"stop".to_string(),
@@ -306,7 +307,7 @@ impl Node {
306307
let NodeStopOptions {
307308
no_wait,
308309
not_gently,
309-
} = opts;
310+
} = opts.unwrap_or_default();
310311
if no_wait {
311312
args.push(NodeStopOptions::NO_WAIT.to_string());
312313
}

0 commit comments

Comments
 (0)