Fix timezone-sensitive tests (disabled in Jenkins)
See original GitHub issueThere are a handful of tests which by their nature are timezone-sensitive (testing Date APIs). Because the execution of some Javascript Date APIs is dependent on the system time zone, the tests only work when run in the time zone in which the baselines were created (in our case, Pacific Time [UTC-8]).
The Jenkins machines are configured with UTC time and so we noticed that these tests would fail in any other timezone. To work around the problem for now, we disabled these tests in Jenkins.
It would be nice to add a way to enable these tests.
My thoughts:
- Some of these tests may not need to depend on the time zone. If possible, modify the tests to make them more general (as long as we keep exercising the same code paths).
- Add a flag to the test runner (
rl.exe
) and/orch.exe
which provides the ability to spoof the system timezone for tests, so that we can test the right code paths within ChakraCore which do depend on the system’s reported time zone.
To locate the affected tests which were disabled in Jenkins, you can run:
git grep -n -C 3 "timezone-sensitive"
/cc @digitalinfinity @tcare @ianwjhalliday @kunalspathak FYI
Converted from VSO 5239718
Issue Analytics
- State:
- Created 8 years ago
- Comments:14 (8 by maintainers)
Top GitHub Comments
Timezone-sensitive tests can spoof current timezone themselves and handle timezone differences internally instead of exposing and printing to output. Just run one API whose output contains timezone and spoof from it; do all comparisons within script with timezone as a variable; only print
pass
or failure details.We don’t have timezone sensitivity problem on *nix. We could set the the timezone on
CH
for Windows process with a command line argument (i.e. ---set-timezone-for-testing
…) or preferably we could do this on python (custom implementation).