Skip to content

Commit

Permalink
refactor(tests): Slow down a hot loop (#1910)
Browse files Browse the repository at this point in the history
## Description

This was an extremely hot loop, hammering the netcheck actor with
requests and flooding the logs.

## Notes & open questions

## Change checklist

- [x] Self-review.
- [x] Documentation updates if relevant.
- [x] Tests if relevant.
  • Loading branch information
flub authored Dec 20, 2023
1 parent b390353 commit 9ac88ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions iroh-net/src/magicsock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2733,6 +2733,7 @@ pub(crate) mod tests {
if ab && ba {
break;
}
tokio::time::sleep(Duration::from_millis(200)).await;
}
})
.await
Expand Down Expand Up @@ -2904,6 +2905,7 @@ pub(crate) mod tests {
if ab && ba {
break;
}
tokio::time::sleep(Duration::from_millis(200)).await;
}
})
.await
Expand Down Expand Up @@ -3151,6 +3153,7 @@ pub(crate) mod tests {
if ab && ba {
break;
}
tokio::time::sleep(Duration::from_millis(200)).await;
}
})
.await
Expand Down

0 comments on commit 9ac88ef

Please sign in to comment.