diff --git a/testing-framework/core/src/scenario/runtime/runner.rs b/testing-framework/core/src/scenario/runtime/runner.rs index 652d740..16c9002 100644 --- a/testing-framework/core/src/scenario/runtime/runner.rs +++ b/testing-framework/core/src/scenario/runtime/runner.rs @@ -45,8 +45,8 @@ impl Runner { /// Access the underlying run context. #[must_use] - pub fn context(&self) -> Arc> { - Arc::clone(&self.context) + pub fn context(&self) -> &RunContext { + self.context.as_ref() } pub async fn wait_network_ready(&self) -> Result<(), DynError> { @@ -71,7 +71,7 @@ impl Runner { where Caps: Send + Sync, { - let context = self.context(); + let context = Arc::clone(&self.context); let run_duration = scenario.duration(); let workloads = scenario.workloads().to_vec(); let expectation_count = scenario.expectations().len();