Skip to content

Commit d50ae2a

Browse files
committed
Resolve merge conflicts
1 parent 9a85af1 commit d50ae2a

3 files changed

Lines changed: 4 additions & 60 deletions

File tree

application/src/test/java/org/opentripplanner/updater/trip/siri/SiriEtBuilder.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,6 @@ public SiriEtBuilder withOccupancy(OccupancyEnumeration occupancy) {
174174
return this;
175175
}
176176

177-
public SiriEtBuilder withPredictionInaccurate(boolean predictionInaccurate) {
178-
evj.setPredictionInaccurate(predictionInaccurate);
179-
return this;
180-
}
181-
182177
public SiriEtBuilder withVehicleJourneyRef(String id) {
183178
var ref = new VehicleJourneyRef();
184179
ref.setValue(id);

application/src/test/java/org/opentripplanner/updater/trip/siri/moduletests/cancellation/CancelledRecordedCallTest.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111
import org.opentripplanner.updater.trip.RealtimeTestConstants;
1212
import org.opentripplanner.updater.trip.SiriTestHelper;
1313

14-
/**
15-
* When a RecordedCall has both cancellation=true and an actual departure time, the cancelled
16-
* state should take precedence over the recorded state. This matches the legacy SIRI adapter
17-
* behavior where [C] is shown instead of [R].
18-
*/
1914
class CancelledRecordedCallTest implements RealtimeTestConstants {
2015

2116
private final TransitTestEnvironmentBuilder ENV_BUILDER = TransitTestEnvironment.of();
@@ -28,11 +23,11 @@ class CancelledRecordedCallTest implements RealtimeTestConstants {
2823
.addStop(STOP_B, "0:01:10", "0:01:11");
2924

3025
/**
31-
* A RecordedCall with both cancellation=true and an actual departure time should show [C]
32-
* (cancelled), not [R] (recorded). Cancelled takes precedence.
26+
* A RecordedCall with both cancellation=true and an actual departure time should have both status
27+
* [C,R]
3328
*/
3429
@Test
35-
void cancelledRecordedCallShouldShowCancelled() {
30+
void cancelledRecordedCall() {
3631
var env = ENV_BUILDER.addTrip(TRIP_INPUT).build();
3732
var siri = SiriTestHelper.of(env);
3833

@@ -51,7 +46,7 @@ void cancelledRecordedCallShouldShowCancelled() {
5146

5247
assertSuccess(result);
5348
assertEquals(
54-
"MODIFIED | A [C] 0:01:01 0:01:01 | B 0:01:10 0:01:10",
49+
"MODIFIED | A [C,R] 0:01:01 0:01:01 | B 0:01:10 0:01:10",
5550
env.tripData(TRIP_1_ID).showTimetable()
5651
);
5752
}

application/src/test/java/org/opentripplanner/updater/trip/siri/moduletests/update/QuayChangeTest.java

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -145,50 +145,4 @@ void testChangeQuayThenUpdateTimesKeepsQuayChange() {
145145
);
146146
assertThat(env.raptorData().summarizePatterns()).containsExactly("F:Route1::001:RT[MODIFIED]");
147147
}
148-
149-
/**
150-
* Change quay (B to C) producing a MODIFIED pattern, then send a second update referencing the
151-
* original stop B, reverting the pattern back to the scheduled one.
152-
*/
153-
@Test
154-
void testChangeQuayThenRevertToOriginalStops() {
155-
var env = ENV_BUILDER.addTrip(TRIP_INPUT).build();
156-
var siri = SiriTestHelper.of(env);
157-
158-
// Step 1: Change quay from B to C (same station)
159-
var quayChange = siri
160-
.etBuilder()
161-
.withDatedVehicleJourneyRef(TRIP_1_ID)
162-
.withRecordedCalls(builder -> builder.call(STOP_A).departAimedActual("00:00:11", "00:00:15"))
163-
.withEstimatedCalls(builder ->
164-
builder.call(STOP_C).arriveAimedExpected("00:00:20", "00:00:33")
165-
)
166-
.buildEstimatedTimetableDeliveries();
167-
168-
var result1 = siri.applyEstimatedTimetable(quayChange);
169-
assertSuccess(result1);
170-
assertEquals(
171-
"MODIFIED | A [R] 0:00:15 0:00:15 | C 0:00:33 0:00:33",
172-
env.tripData(TRIP_1_ID).showTimetable()
173-
);
174-
175-
// Step 2: Revert to original stop B with updated times
176-
var revert = siri
177-
.etBuilder()
178-
.withDatedVehicleJourneyRef(TRIP_1_ID)
179-
.withRecordedCalls(builder -> builder.call(STOP_A).departAimedActual("00:00:11", "00:00:16"))
180-
.withEstimatedCalls(builder ->
181-
builder.call(STOP_B).arriveAimedExpected("00:00:20", "00:00:30")
182-
)
183-
.buildEstimatedTimetableDeliveries();
184-
185-
var result2 = siri.applyEstimatedTimetable(revert);
186-
assertSuccess(result2);
187-
assertEquals(
188-
"UPDATED | A [R] 0:00:16 0:00:16 | B 0:00:30 0:00:30",
189-
env.tripData(TRIP_1_ID).showTimetable()
190-
);
191-
// Pattern reverts to the scheduled one (not an RT pattern), but trip state is UPDATED
192-
assertThat(env.raptorData().summarizePatterns()).containsExactly("F:Pattern1[UPDATED]");
193-
}
194148
}

0 commit comments

Comments
 (0)