diff --git a/testing-framework/core/src/scenario/runtime/context.rs b/testing-framework/core/src/scenario/runtime/context.rs index 65f28a5..2eaa256 100644 --- a/testing-framework/core/src/scenario/runtime/context.rs +++ b/testing-framework/core/src/scenario/runtime/context.rs @@ -121,22 +121,12 @@ impl RunContext { self.node_control.clone() } - #[must_use] - pub fn cluster_wait(&self) -> Option>> { - self.cluster_wait.clone() - } - #[must_use] pub const fn controls_nodes(&self) -> bool { self.node_control.is_some() } - #[must_use] - pub const fn can_wait_network_ready(&self) -> bool { - self.cluster_wait.is_some() - } - - pub async fn wait_network_ready(&self) -> Result<(), DynError> { + pub(crate) async fn wait_network_ready(&self) -> Result<(), DynError> { self.require_cluster_wait()?.wait_network_ready().await } @@ -146,7 +136,9 @@ impl RunContext { } fn require_cluster_wait(&self) -> Result>, DynError> { - self.cluster_wait() + self.cluster_wait + .as_ref() + .map(Arc::clone) .ok_or_else(|| RunContextCapabilityError::MissingClusterWait.into()) } } @@ -192,10 +184,6 @@ impl RunHandle { pub fn context(&self) -> &RunContext { &self.run_context } - - pub async fn wait_network_ready(&self) -> Result<(), DynError> { - self.run_context.wait_network_ready().await - } } /// Derived metrics about the current run timing.