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

Routing open-hours tests are failing in different timezones #4944

Open
biodranik opened this issue Apr 9, 2023 · 0 comments
Open

Routing open-hours tests are failing in different timezones #4944

biodranik opened this issue Apr 9, 2023 · 0 comments
Labels
Opening Hours Business Hours, off time, holidays, seasonal Tests

Comments

@biodranik
Copy link
Member

biodranik commented Apr 9, 2023

TZ='America/Argentina/Buenos_Aires' ../omim-build-debug/routing_tests works, while
TZ='Europe/Paris' ../omim-build-debug/routing_tests fails:

Running opening_hours_serdes_tests.cpp::OHSerDesTestFixture_OpeningHoursSerDes_Weekday_Usage_2
FAILED
routing_tests/opening_hours_serdes_tests.cpp:749 TEST(oh.IsOpen(GetUnixtimeByDate(2023, Month::Apr, Weekday::Saturday, 13 , 30 ))) 

Running opening_hours_serdes_tests.cpp::OHSerDesTestFixture_OpeningHoursSerDes_MonthHours_Usage
FAILED
routing_tests/opening_hours_serdes_tests.cpp:822 TEST(oh.IsClosed(GetUnixtimeByDate(2020, Month::May, 6, 01 , 00 ))) 

Running road_access_test.cpp::RoadAccess_WayBlockedWhenStartButOpenWhenReach
FAILED
routing_tests/index_graph_tools.cpp:608 TEST(base::AlmostEqualAbs(pathWeight, expectedWeight, kEpsilon)) 10804 12802 [5: (0, 1) (1, 2) (2, 3) (3, 4) (4, 5) ]

Opening hours/times in OpenStreetMap are specified in the local time zone. Tests (and production code!) should be robust to work properly with any local timezone specified.

@biodranik biodranik added Tests Opening Hours Business Hours, off time, holidays, seasonal labels Apr 9, 2023
@biodranik biodranik changed the title Routing tests are failing in different timezones Routing open-hours tests are failing in different timezones Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Opening Hours Business Hours, off time, holidays, seasonal Tests
Projects
None yet
Development

No branches or pull requests

1 participant