Skip to content

Commit

Permalink
test: add sleep between er and asr in tests
Browse files Browse the repository at this point in the history
Signed-off-by: bsbds <[email protected]>
  • Loading branch information
bsbds committed Sep 2, 2024
1 parent e99f318 commit aa8bee0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/curp/src/client/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down Expand Up @@ -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)))
Expand Down

0 comments on commit aa8bee0

Please sign in to comment.