mirror of
https://github.com/epi052/feroxbuster.git
synced 2026-05-24 05:41:12 -03:00
clippy/fmt
This commit is contained in:
@@ -674,7 +674,7 @@ mod tests {
|
||||
// allow for timing imprecision: sleep overhead makes elapsed time slightly > 1 second
|
||||
// e.g., 100 reqs / 1.01s = 99 req/s
|
||||
assert!(
|
||||
req_sec >= 99 && req_sec <= 101,
|
||||
(99..=101).contains(&req_sec),
|
||||
"Expected ~100 req/s, got {}",
|
||||
req_sec
|
||||
);
|
||||
|
||||
@@ -1236,7 +1236,7 @@ mod tests {
|
||||
let original = requester.policy_data.heap.read().unwrap().original;
|
||||
// Allow for timing imprecision: 400 reqs / 1.01s elapsed = 399 req/s
|
||||
assert!(
|
||||
original >= 399 && original <= 401,
|
||||
(399..=401).contains(&original),
|
||||
"Expected ~400 req/s original, got {}",
|
||||
original
|
||||
);
|
||||
@@ -1244,14 +1244,14 @@ mod tests {
|
||||
let limit = requester.policy_data.get_limit();
|
||||
// Limit is original/2, so with original 399-401, limit is 199-200
|
||||
assert!(
|
||||
limit >= 199 && limit <= 201,
|
||||
(199..=201).contains(&limit),
|
||||
"Expected limit ~200, got {}",
|
||||
limit
|
||||
);
|
||||
|
||||
let rate_limiter_max = requester.rate_limiter.read().await.as_ref().unwrap().max();
|
||||
assert!(
|
||||
rate_limiter_max >= 199 && rate_limiter_max <= 201,
|
||||
(199..=201).contains(&rate_limiter_max),
|
||||
"Expected rate limiter max ~200, got {}",
|
||||
rate_limiter_max
|
||||
);
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
/// Rate Limiting Test Harness
|
||||
///
|
||||
/// This provides controllable mock server scenarios to test rate limiting behavior.
|
||||
///
|
||||
/// Run with: cargo test --test test_rate_limiting_harness -- --nocapture
|
||||
///
|
||||
/// Each test demonstrates a different rate limiting scenario and can be run independently
|
||||
|
||||
mod utils;
|
||||
|
||||
use assert_cmd::Command;
|
||||
|
||||
Reference in New Issue
Block a user