Skip to content

Commit

Permalink
throttle: increase tolerance in test cases
Browse files Browse the repository at this point in the history
refs: #297
  • Loading branch information
wez committed Dec 12, 2024
1 parent d673319 commit 8aee36a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/throttle/src/throttle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,15 +337,15 @@ mod test {

#[tokio::test]
async fn basic_throttle_60_000() {
test_big_limits(60_000, Some(100), 0.05, &*MEMORY).await;
test_big_limits(60_000, Some(100), 0.1, &*MEMORY).await;
}

#[tokio::test]
async fn basic_throttle_60_000_burst_30k() {
// Note that the 5% tolerance here is the same as the basic_throttle_60_000
// test case because the variance is due to timing issues with very small
// time periods produced by the overally limit, rather than the burst.
test_big_limits(60_000, Some(100), 0.05, &*MEMORY).await;
test_big_limits(60_000, Some(100), 0.1, &*MEMORY).await;
}

#[tokio::test]
Expand Down

0 comments on commit 8aee36a

Please sign in to comment.