Skip to content

Commit

Permalink
fix(tests): debugging, use dedicated fake server path to avoid confli…
Browse files Browse the repository at this point in the history
…cts with parallel tests
  • Loading branch information
azasypkin committed Jan 25, 2025
1 parent a2c94c7 commit 572f453
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/scheduler/scheduler_jobs/trackers_run_job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ mod tests {
let server = MockServer::start();

// Create tracker with retry strategy.
let api_url = server.url("/api");
let api_url = server.url("/api-retry");
let mut create_params = TrackerCreateParamsBuilder::new("tracker-with-retry")
.with_target(TrackerTarget::Api(ApiTarget {
requests: vec![TargetRequest::new(api_url.parse()?)],
Expand Down Expand Up @@ -1523,7 +1523,7 @@ mod tests {
let attempt_one_mock = server.mock(|when, then| {
when.method(httpmock::Method::GET)
.header("x-custom-header", "attempt-1")
.path("/api");
.path("/api-retry");
then.status(400)
.header("Content-Type", "application/json")
.body("Uh oh (first attempt)!")
Expand All @@ -1533,7 +1533,7 @@ mod tests {
let attempt_two_mock = server.mock(|when, then| {
when.method(httpmock::Method::GET)
.header("x-custom-header", "attempt-2")
.path("/api");
.path("/api-retry");
then.status(400)
.header("Content-Type", "application/json")
.body("Uh oh (second attempt)!")
Expand All @@ -1544,7 +1544,7 @@ mod tests {
let attempt_three_mock = server.mock(|when, then| {
when.method(httpmock::Method::GET)
.header("x-custom-header", "attempt-3")
.path("/api");
.path("/api-retry");
then.status(200)
.header("Content-Type", "application/json")
.json_body_obj(content.value())
Expand Down

0 comments on commit 572f453

Please sign in to comment.