Skip to content

Conversation

@leonardehrenfried
Copy link
Member

Summary

In #6280 @miklcct is adding some code that touches the TimetableSnapshot. I believe, that given the current constraints, this is acceptable, but we should probably add some tests for the current behaviour of the SIRI updaters beforehand.

This PR adds them. It builds on the pattern established by @habrahamsson-skanetrafiken: returning fetchers from the environment which can then be further queried.

Unit tests

This PR is only about unit tests.

Documentation

Javadoc.

@leonardehrenfried leonardehrenfried requested a review from a team as a code owner December 10, 2025 12:55
@leonardehrenfried leonardehrenfried 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 Dec 10, 2025
@Test
@Disabled
@Disabled(
"Can be enabled when https://github.com/opentripplanner/OpenTripPlanner/pull/6280 is merged"
Copy link
Member Author

Choose a reason for hiding this comment

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

@flaktack You will be interested in this.

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.09%. Comparing base (6d59a52) to head (e0d072f).
⚠️ Report is 49 commits behind head on dev-2.x.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #7129      +/-   ##
=============================================
+ Coverage      72.05%   72.09%   +0.03%     
- Complexity     20679    20692      +13     
=============================================
  Files           2242     2244       +2     
  Lines          83801    83899      +98     
  Branches        8348     8347       -1     
=============================================
+ Hits           60385    60486     +101     
+ Misses         20488    20483       -5     
- Partials        2928     2930       +2     

☔ 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.

@leonardehrenfried leonardehrenfried force-pushed the routing-pattern-test branch 3 times, most recently from a3a5341 to 3088b0b Compare December 12, 2025 10:06
"Can be enabled when https://github.com/opentripplanner/OpenTripPlanner/pull/6280 is merged"
)
void addedThenRemoved() {
assertThat(env.raptorData().summarizePatterns()).containsExactly("F:Pattern1");
Copy link
Contributor

Choose a reason for hiding this comment

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

This will fail since the format is %s[%s]?
Should the expectation be "F:Pattern1[SCHEDULED]" ?
Possibly same issue in AssignedStopIdsTest.reuseRealtimeTripPatterns and AssignedStopIdsTest.reuseRealtimeTripPatternsOnDifferentServiceDates()?

@leonardehrenfried leonardehrenfried changed the title Add tests for real-time-added routing trip patterns Add module tests for updating raptor transit data Dec 18, 2025
@leonardehrenfried leonardehrenfried added this pull request to the merge queue Dec 18, 2025
Merged via the queue into opentripplanner:dev-2.x with commit 2891fc2 Dec 18, 2025
8 checks passed
@leonardehrenfried leonardehrenfried deleted the routing-pattern-test branch December 18, 2025 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

+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