From 8e68c7f808bc3e07f17f0ce998f54388721daeba Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 5 Apr 2023 16:52:39 -0700 Subject: [PATCH] Do include operations in serialized test plan if they cause a client to hang --- crates/collab/src/tests/randomized_integration_tests.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/collab/src/tests/randomized_integration_tests.rs b/crates/collab/src/tests/randomized_integration_tests.rs index b85633ba15..c70c76a76a 100644 --- a/crates/collab/src/tests/randomized_integration_tests.rs +++ b/crates/collab/src/tests/randomized_integration_tests.rs @@ -1854,13 +1854,14 @@ async fn simulate_client( while let Some(batch_id) = operation_rx.next().await { let Some((operation, applied)) = plan.lock().next_client_operation(&client, batch_id, &cx) else { break }; + applied.store(true, SeqCst); match apply_client_operation(&client, operation, &mut cx).await { - Ok(()) => applied.store(true, SeqCst), + Ok(()) => {} Err(TestError::Inapplicable) => { + applied.store(false, SeqCst); log::info!("skipped operation"); } Err(TestError::Other(error)) => { - applied.store(true, SeqCst); log::error!("{} error: {}", client.username, error); } }