Skip to content

Commit

Permalink
Make the test itinerary instance non-static as it's modified in some …
Browse files Browse the repository at this point in the history
…tests.

Specifically, an itinerary can be flagged for deletion in one test, which
affects the assertions in the next test.

Without this, tests may fail if they are executed in a certain order.
This may be because LC_COLLATE is not set in the environment.
  • Loading branch information
jtorin committed Oct 18, 2024
1 parent 15ba54a commit eac5d35
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,12 @@ void testPostProcessorWithMaxItinerariesFilterSetToOneArriveBy() {
@Nested
class FlexSearchWindow {

private static final Itinerary FLEX = newItinerary(A, T11_00)
private final Itinerary FLEX = newItinerary(A, T11_00)
.flex(T11_00, T11_30, B)
.withIsSearchWindowAware(false)
.build();
private static final Instant EARLIEST_DEPARTURE = FLEX.startTime().plusMinutes(10).toInstant();
private static final Duration SEARCH_WINDOW = Duration.ofHours(7);
private final Instant EARLIEST_DEPARTURE = FLEX.startTime().plusMinutes(10).toInstant();
private final Duration SEARCH_WINDOW = Duration.ofHours(7);

/**
* When the filtering of direct flex by the transit search window is deactivated, the direct
Expand Down

0 comments on commit eac5d35

Please sign in to comment.