Skip to content

Commit 84734ef

Browse files
committed
update: simplifier codebase
1 parent e3627e6 commit 84734ef

File tree

5 files changed

+126
-527
lines changed

5 files changed

+126
-527
lines changed

madara/crates/client/gateway/client/src/retry.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,13 @@ mod tests {
188188
// Immediate second log should be throttled
189189
assert!(!state.should_log());
190190

191-
// After interval, should log again
192-
tokio::time::sleep(Duration::from_millis(150)).await;
193-
assert!(state.should_log());
191+
// Wait for less than log_interval
192+
tokio::time::sleep(Duration::from_millis(50)).await;
193+
assert!(!state.should_log(), "Still should be throttled");
194+
195+
// Wait for the rest of the interval
196+
tokio::time::sleep(Duration::from_millis(60)).await;
197+
assert!(state.should_log(), "Should log after interval");
194198
}
195199

196200
#[test]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pub mod retry_stress_tests;
1+
pub mod retry_tests;

0 commit comments

Comments
 (0)