Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Simulate server restarts in randomized test
Antonio Scandurraa594ba8f8a12
diff --git a/crates/collab/src/integration_tests.rs b/crates/collab/src/integration_tests.rsindex bd4ad8a580d..2a3f6ff62cc 100644--- a/crates/collab/src/integration_tests.rs+++ b/crates/collab/src/integration_tests.rs@@ -6121,6 +6121,13 @@ async fn test_random_collaboration(deterministic.advance_clock(RECEIVE_TIMEOUT + RECONNECT_TIMEOUT);operations += 1;}+ 30..=34 => {+ log::info!("Simulating server restart");+ server.teardown();+ deterministic.advance_clock(RECEIVE_TIMEOUT + RECONNECT_TIMEOUT);+ server.start().await.unwrap();+ deterministic.advance_clock(RECONNECT_TIMEOUT);+ }_ if !op_start_signals.is_empty() => {while operations < max_operations && rng.lock().gen_bool(0.7) {op_start_signals