Skip to content

Comments

Add missing SIRI ET module tests for modified trips#7294

Merged
leonardehrenfried merged 3 commits intoopentripplanner:dev-2.xfrom
entur:siri-et-module-tests-modified-trips
Feb 23, 2026
Merged

Add missing SIRI ET module tests for modified trips#7294
leonardehrenfried merged 3 commits intoopentripplanner:dev-2.xfrom
entur:siri-et-module-tests-modified-trips

Conversation

@vpaturet
Copy link
Contributor

@vpaturet vpaturet commented Feb 13, 2026

Summary

Add 8 tests covering use cases for SIRI ET modified trips:

  • Mixed recorded + estimated calls
  • Successive updates replacing previous delays
  • Cancel all stops triggering implicit trip cancellation
  • Multi-trip pattern isolation (update one, leave other unaffected)
  • Journey-level occupancy propagation
  • Prediction inaccurate flag propagation
  • Updating times on a previously added (replacement) trip
  • Quay change then revert to original stops

Also adds withOccupancy() and withPredictionInaccurate() builder methods to SiriEtBuilder for test support.

Issue

No

Unit tests

Added unit tests.

Documentation

No

Changelog

skip

@vpaturet vpaturet added !Technical Debt Improve code quality, no functional changes. +Skip Changelog This is not a relevant change for a product owner since last release. labels Feb 13, 2026
@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.33%. Comparing base (3d8dbaf) to head (9339ea4).
⚠️ Report is 77 commits behind head on dev-2.x.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #7294      +/-   ##
=============================================
- Coverage      72.20%   70.33%   -1.88%     
+ Complexity     21319    20497     -822     
=============================================
  Files           2323     2324       +1     
  Lines          86066    85920     -146     
  Branches        8554     8524      -30     
=============================================
- Hits           62141    60428    -1713     
- Misses         20915    22515    +1600     
+ Partials        3010     2977      -33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Add 8 tests covering common real-world use cases for the SIRI ET
updater's ModifiedTripBuilder and handleModifiedTrip flow:

- Mixed recorded + estimated calls (most common SIRI pattern)
- Successive updates replacing previous delays
- Cancel all stops triggering implicit trip cancellation
- Multi-trip pattern isolation (update one, leave other unaffected)
- Journey-level occupancy propagation
- Prediction inaccurate flag propagation
- Updating times on a previously added (replacement) trip
- Quay change then revert to original stops

Also adds withOccupancy() and withPredictionInaccurate() builder
methods to SiriEtBuilder for test support.
@vpaturet vpaturet force-pushed the siri-et-module-tests-modified-trips branch from c36557b to ae5f7e8 Compare February 13, 2026 02:00
@vpaturet vpaturet marked this pull request as ready for review February 13, 2026 02:25
@vpaturet vpaturet requested a review from a team as a code owner February 13, 2026 02:25
@vpaturet vpaturet added the +Real-Time The issue/PR is related to RealTime updates label Feb 13, 2026
# Conflicts:
#	application/src/test/java/org/opentripplanner/updater/trip/siri/moduletests/extrajourney/ExtraJourneyTest.java
.addStop(STOP_B, "0:00:20", "0:00:21");

@Test
void testCancelAllStopsCancelsTrip() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document that it's unsure if this is the behaviour that we want.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@vpaturet vpaturet force-pushed the siri-et-module-tests-modified-trips branch from 4fde300 to 9339ea4 Compare February 23, 2026 10:00
@leonardehrenfried leonardehrenfried added this pull request to the merge queue Feb 23, 2026
Merged via the queue into opentripplanner:dev-2.x with commit d951879 Feb 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

+Real-Time The issue/PR is related to RealTime updates +Skip Changelog This is not a relevant change for a product owner since last release. !Technical Debt Improve code quality, no functional changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants