Skip to content

Commit

Permalink
fix: more time in tryRecv to compensate longer RTT
Browse files Browse the repository at this point in the history
  • Loading branch information
alemidev committed Oct 30, 2024
1 parent 90568bb commit e0b919b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tests/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@ async fn test_content_converges() {

// TODO is there a nicer way to make sure we received all changes?

for i in 0..100 {
tokio::time::sleep(std::time::Duration::from_millis(50)).await;
for i in 0..20 {
tokio::time::sleep(std::time::Duration::from_millis(200)).await;
match bob.try_recv().await? {
Some(change) => bob.ack(change.version),
None => break,
}
eprintln!("bob more to recv at attempt #{i}");
}

for i in 0..100 {
tokio::time::sleep(std::time::Duration::from_millis(50)).await;
for i in 0..20 {
tokio::time::sleep(std::time::Duration::from_millis(200)).await;
match alice.try_recv().await? {
Some(change) => alice.ack(change.version),
None => break,
Expand Down

0 comments on commit e0b919b

Please sign in to comment.