Fix TPoint generation for real-time generated patterns - #4787
Conversation
Codecov ReportBase: 61.87% // Head: 61.97% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #4787 +/- ##
=============================================
+ Coverage 61.87% 61.97% +0.09%
- Complexity 12831 12915 +84
=============================================
Files 1619 1644 +25
Lines 64958 65527 +569
Branches 7078 7131 +53
=============================================
+ Hits 40196 40612 +416
- Misses 22481 22603 +122
- Partials 2281 2312 +31
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
I checked this out now and it doesn't fix the issue I'm having when using the same transfers from two feeds with the same feed id. You can find the reproduction case here: https://leonard.io/ibi/hopelink-duplicate-feed-ids.zip (it's all input sources including config in a single zip). However, I think I made it clear that I'm only too happy to tell IBI that duplicate feed entities from different feeds aren't supported. Could you look at the example and form an opinion if you still want to fix that case? (Not asking you to do it just if we should support it.) |
|
Unfortunately this PR doesn't fix our bug at Skånetrafiken either. The AIOOB exception moves to the processing of the non-realtime RoutingTripPattern, to around the code: Nevertheless: I like the direction the PR takes the code, unless the processing of the entries in two separate batches is adding complexity unnecessarily. |
If that is producing the issue, then there is something wrong with the |
The trips I see failing is from NeTEx. |
|
Can you add what the fields of the |
Just wanted to add that the problems we're seeing seems to be unrelated to this PR. |
Summary
Currently the generation crashes if the
TripTransferPoint#getStopPositionInPattern()is greater thanRoutingTripPattern#numberOfStopsInPattern, or it would create a transfer between the wrong stop, if the pattern changed. This changes the handling so that we check the index and compare the stop at that point, and generate a constrained transfer only if it is the same stop, or its sibling, at the specified stop point in pattern.