Skip to content
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

Test: Add journey cache cleanup tests for TimeTableViewModel #517

Conversation

ksharma-xyz
Copy link
Owner

@ksharma-xyz ksharma-xyz commented Jan 8, 2025

TL;DR

Added functionality to clear completed journeys from the timetable cache after a threshold time.

What changed?

  • Added a new test case to verify the clearing of completed journeys from cache
  • Modified buildStartedJourneysList test helper to support creating completed journeys
  • Made JOURNEY_ENDED_CACHE_THRESHOLD_TIME visible for testing purposes
  • Enhanced test data generation to include destination times for journey completion validation

Why make this change?

To prevent the accumulation of stale journey data in the cache by automatically removing completed journeys after a specified threshold time (10 minutes). This helps maintain optimal performance and ensures users see only relevant journey information.

@ksharma-xyz ksharma-xyz changed the title ADD UT - test remove completed journey from the cache Test: Add journey cache cleanup tests for TimeTableViewModel Jan 8, 2025
@ksharma-xyz ksharma-xyz marked this pull request as ready for review January 8, 2025 00:38
@ksharma-xyz ksharma-xyz force-pushed the 01-06-test_for_updatetripscache branch 2 times, most recently from ae779c7 to e114879 Compare January 8, 2025 01:00
@ksharma-xyz ksharma-xyz force-pushed the 01-06-add_ut_-_test_remove_completed_journey_from_the_cache branch from 2fa6387 to b63ad3a Compare January 8, 2025 01:00
@ksharma-xyz ksharma-xyz changed the base branch from 01-06-test_for_updatetripscache to graphite-base/517 January 8, 2025 07:40
@ksharma-xyz ksharma-xyz force-pushed the 01-06-add_ut_-_test_remove_completed_journey_from_the_cache branch from b63ad3a to bcf322f Compare January 8, 2025 07:40
@ksharma-xyz ksharma-xyz changed the base branch from graphite-base/517 to main January 8, 2025 07:40
@ksharma-xyz ksharma-xyz force-pushed the 01-06-add_ut_-_test_remove_completed_journey_from_the_cache branch from bcf322f to 964359d Compare January 8, 2025 07:40
Copy link
Owner Author

ksharma-xyz commented Jan 8, 2025

Merge activity

  • Jan 8, 4:17 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Jan 8, 4:17 AM EST: A user merged this pull request with Graphite.

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.

1 participant