Skip to content

Commit

Permalink
Use default retries = 1
Browse files Browse the repository at this point in the history
  • Loading branch information
squadgazzz committed Nov 22, 2023
1 parent cf6e0dc commit 432d0e9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions crates/solvers/src/boundary/rate_limiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct RateLimitingStrategy {
max_retries: usize,
}

const DEFAULT_MAX_RETIRES: usize = 2;
const DEFAULT_MAX_RETIRES: usize = 1;

impl Default for RateLimitingStrategy {
fn default() -> Self {
Expand Down Expand Up @@ -129,7 +129,10 @@ mod tests {

#[tokio::test]
async fn test_execute_with_retries() {
let strategy = RateLimitingStrategy::default();
let strategy = RateLimitingStrategy {
inner: SharedRateLimitingStrategy::default(),
max_retries: 2,
};
let rate_limiter = RateLimiter::new(strategy, "test".to_string());
let call_count = AtomicUsize::new(0);

Expand Down Expand Up @@ -157,7 +160,10 @@ mod tests {

#[tokio::test]
async fn test_execute_with_retries_exceeds() {
let strategy = RateLimitingStrategy::default();
let strategy = RateLimitingStrategy {
inner: SharedRateLimitingStrategy::default(),
max_retries: 2,
};
let rate_limiter = RateLimiter::new(strategy, "test".to_string());
let call_count = AtomicUsize::new(0);

Expand Down

0 comments on commit 432d0e9

Please sign in to comment.