diff --git a/gpui/src/executor.rs b/gpui/src/executor.rs index 91978e0e70..bc23b63fcc 100644 --- a/gpui/src/executor.rs +++ b/gpui/src/executor.rs @@ -328,23 +328,14 @@ impl Foreground { } } - pub fn reset(&self) { - match self { - Self::Platform { .. } => panic!("can't call this method on a platform executor"), - Self::Test(_) => panic!("can't call this method on a test executor"), - Self::Deterministic(executor) => { - let state = &mut *executor.state.lock(); - state.rng = StdRng::seed_from_u64(state.seed); - } - } - } - pub fn forbid_parking(&self) { match self { Self::Platform { .. } => panic!("can't call this method on a platform executor"), Self::Test(_) => panic!("can't call this method on a test executor"), Self::Deterministic(executor) => { - executor.state.lock().forbid_parking = true; + let mut state = executor.state.lock(); + state.forbid_parking = true; + state.rng = StdRng::seed_from_u64(state.seed); } } } diff --git a/server/src/tests.rs b/server/src/tests.rs index 9c05e09fc5..8767155ca0 100644 --- a/server/src/tests.rs +++ b/server/src/tests.rs @@ -523,8 +523,6 @@ impl TestServer { .await .unwrap(); - // Reset the executor because running SQL queries has a non-deterministic impact on it. - cx.foreground().reset(); client }