diff --git a/crates/curp/src/client/tests.rs b/crates/curp/src/client/tests.rs index f8c0649f3..e97fce4ce 100644 --- a/crates/curp/src/client/tests.rs +++ b/crates/curp/src/client/tests.rs @@ -293,6 +293,7 @@ async fn test_unary_propose_fast_path_works() { assert_eq!(id, 0, "followers should not receive propose"); let resp = async_stream::stream! { yield Ok(build_propose_response(false)); + tokio::time::sleep(Duration::from_millis(100)).await; yield Ok(build_synced_response()); }; Ok(tonic::Response::new(Box::new(resp))) @@ -540,6 +541,7 @@ async fn test_read_index_success() { assert_eq!(id, 0, "followers should not receive propose"); let resp = async_stream::stream! { yield Ok(build_propose_response(false)); + tokio::time::sleep(Duration::from_millis(100)).await; yield Ok(build_synced_response()); }; Ok(tonic::Response::new(Box::new(resp)))