Skip to content

Commit

Permalink
fix(tests): increase test timeouts to help with CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
azasypkin committed Jan 25, 2025
1 parent 22896a9 commit 7760cf2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/scheduler/scheduler_jobs/trackers_run_job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ mod tests {
create_params.config.job = Some(SchedulerJobConfig {
schedule: "0 0 * * * *".to_string(),
retry_strategy: Some(SchedulerJobRetryStrategy::Constant {
interval: Duration::from_secs(2),
interval: Duration::from_secs(3),
max_attempts: 2,
}),
});
Expand All @@ -1525,7 +1525,7 @@ mod tests {
then.status(400)
.header("Content-Type", "application/json")
.body("Uh oh!")
.delay(Duration::from_secs(2));
.delay(Duration::from_secs(3));
});

let attempt_two_mock = server.mock(|when, then| {
Expand All @@ -1535,7 +1535,7 @@ mod tests {
then.status(400)
.header("Content-Type", "application/json")
.body("Uh oh!")
.delay(Duration::from_secs(2));
.delay(Duration::from_secs(3));
});

let content = TrackerDataValue::new(json!("Hooray!!!"));
Expand All @@ -1546,7 +1546,7 @@ mod tests {
then.status(200)
.header("Content-Type", "application/json")
.json_body_obj(content.value())
.delay(Duration::from_secs(2));
.delay(Duration::from_secs(3));
});

assert!(trackers
Expand Down Expand Up @@ -1580,7 +1580,7 @@ mod tests {
break;
}

tokio::time::sleep(Duration::from_millis(100)).await;
tokio::time::sleep(Duration::from_millis(50)).await;
}

scheduler.shutdown().await?;
Expand Down

0 comments on commit 7760cf2

Please sign in to comment.