From eac5d35b3457112ef257a2e6ac240435eb521b04 Mon Sep 17 00:00:00 2001 From: "Johan Torin (extern)" Date: Fri, 18 Oct 2024 08:07:29 +0000 Subject: [PATCH] Make the test itinerary instance non-static as it's modified in some 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. --- .../algorithm/filterchain/ItineraryListFilterChainTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainTest.java index 1cd19823f17..88758eb64ca 100644 --- a/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainTest.java +++ b/application/src/test/java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainTest.java @@ -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