Skip to content

Fix/block sequence fallback#757

Open
ashnaaseth2325-oss wants to merge 4 commits intoOneBusAway:mainfrom
ashnaaseth2325-oss:fix/block-sequence-fallback
Open

Fix/block sequence fallback#757
ashnaaseth2325-oss wants to merge 4 commits intoOneBusAway:mainfrom
ashnaaseth2325-oss:fix/block-sequence-fallback

Conversation

@ashnaaseth2325-oss
Copy link
Copy Markdown
Contributor

1. SUMMARY

Fixes a bug where the function returned 0 on DB error instead of the given stopSequence.
Keeps fallback behavior consistent.


2. FIX

// before
if err != nil {
    return 0
}

// after
if err != nil {
    return stopSequence
}

3. VERIFICATION

  • Simulate DB error
  • Call function

Result: returns stopSequence (not 0)

Signed-off-by: ashnaaseth2325-oss <ashnaaseth2325@gmail.com>
@ashnaaseth2325-oss ashnaaseth2325-oss force-pushed the fix/block-sequence-fallback branch from 03cb01c to 71b74ef Compare March 20, 2026 12:08
Signed-off-by: ashnaaseth2325-oss <ashnaaseth2325@gmail.com>
Add MockClearServiceIDsCache() before and after the plural arrivals
endpoint call in TestArrivalsAndDeparturesForStopHandler_MultiAgency_Regression,
following the same pattern established in setupDelayPropTestData and
TestArrivalsAndDeparturesForStop_VehicleWithNilID. This prevents a
stale cache entry for "20100101" from hiding the newly inserted
"service1" calendar when tests share the same GtfsManager instance.

Signed-off-by: ashnaaseth2325-oss <ashnaaseth2325@gmail.com>
@ashnaaseth2325-oss
Copy link
Copy Markdown
Contributor Author

Hi @aaronbrethorst ,
Kindly look into the PR whenever you have time.
Thanks!

@ashnaaseth2325-oss
Copy link
Copy Markdown
Contributor Author

Hi @aaronbrethorst, just checking in on this PR. Happy to make any changes if needed. Thanks!

@ashnaaseth2325-oss
Copy link
Copy Markdown
Contributor Author

Hi @aaronbrethorst,
Kindly take a look!

@aaronbrethorst
Copy link
Copy Markdown
Member

@ashnaaseth2325-oss please fix merge conflicts!

1 similar comment
@aaronbrethorst
Copy link
Copy Markdown
Member

@ashnaaseth2325-oss please fix merge conflicts!

@ashnaaseth2325-oss
Copy link
Copy Markdown
Contributor Author

Thanks for pointing this out @aaronbrethorst !
Just resolved the conflicts.
I kept one cache clear before the test and added a cleanup to avoid any cross-test leakage.
Happy to tweak if needed!

@ashnaaseth2325-oss
Copy link
Copy Markdown
Contributor Author

Hi @aaronbrethorst
Friendly ping in case this got missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants