-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SIRI update travel back in time #5867
Fix SIRI update travel back in time #5867
Conversation
2dc2265
to
a71c690
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #5867 +/- ##
=============================================
- Coverage 68.54% 68.47% -0.07%
+ Complexity 16732 16699 -33
=============================================
Files 1918 1914 -4
Lines 72734 72676 -58
Branches 7456 7454 -2
=============================================
- Hits 49854 49768 -86
- Misses 20310 20338 +28
Partials 2570 2570 ☔ View full report in Codecov by Sentry. |
I do not see any reason why we/OTP should accept invalid data, so in my opinion, this is acceptable. |
a71c690
to
f3c38ed
Compare
f3c38ed
to
e7e38e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks ok, just a few questions.
Summary
As detailed in #5866, some combinations of SIRI messages lead to the creation of invalid trips where passing times do not increase along the journey.
This PR aims to fix one such scenario where:
The canceled trip can then be queried thanks to the API parameter
includeRealtimeCancellations=true
The proposed fix is to validate the scheduled data in step 2 and rejects messages that contain invalid scheduled data.
Issue
Closes #5866
Unit tests
Added unit test