opentripplanner / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
2.13k stars 1.01k forks source link

SiriTimetableSnapshot tests #5852

Closed habrahamsson-skanetrafiken closed 1 month ago

habrahamsson-skanetrafiken commented 1 month ago

This PR is part of the realtime refactor work.

It mainly contains tests for SiriTimetableSnapshotSource. The purpose is to: 1) Verify that the transit model is updated correctly given different siri ET messages. 2) Make it easier to refactor the realtime behaviour without breaking functionality. 3) Document existing behaviour.

Currently the tests are on a pretty high level and basically generate Siri ET messages, apply them using SiriTimetableSnapshotSource and then verify the changes to the realtime parts of the transit model.

There are also two minor bugfixes:

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 85.71429% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 68.37%. Comparing base (5a5fd21) to head (27c5343). Report is 70 commits behind head on dev-2.x.

Files Patch % Lines
...a/org/opentripplanner/ext/siri/EntityResolver.java 85.71% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev-2.x #5852 +/- ## ============================================= + Coverage 67.91% 68.37% +0.45% - Complexity 16561 16676 +115 ============================================= Files 1910 1914 +4 Lines 72441 72652 +211 Branches 7444 7452 +8 ============================================= + Hits 49201 49675 +474 + Misses 20720 20421 -299 - Partials 2520 2556 +36 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

habrahamsson-skanetrafiken commented 1 month ago

I rolled back the fix for feedId comparison after discussions in the developer meeting, and will make a separate PR for that