question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix timezone-sensitive tests (disabled in Jenkins)

See original GitHub issue

There 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/or ch.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:closed
  • Created 8 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
jianchuncommented, Aug 4, 2017

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.

1reaction
obastemurcommented, Aug 4, 2017

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).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix timezone-sensitive tests (disabled in Jenkins) #319 - GitHub
The Jenkins machines are configured with UTC time and so we noticed that these tests would fail in any other timezone. To work...
Read more >
Change System Time Zone - Jenkins
The system time zone configuration is the default time zone displayed by Jenkins. The "Manage Jenkins" ⇒ "System Information" page shows the value...
Read more >
How to run Jenkins in test mode with all automatic triggers ...
I am trying to find a way to disable automatic job execution on all jenkins jobs on a stage instance. We are using...
Read more >
dreamkxd – Trac Hacks - Plugins Macros etc.
#11319 enhancement: Ability to Modify Test Plans (closed: fixed) ... HudsonTracPlugin Hudson and Jenkins integration into Trac ...
Read more >
Bug - Release Notes - Liferay Issues
Portlet.ready doesn't start, if javascript.fast.load was set as true ... [LPS-14345] - When cookies are disabled jsessionid is appended to external urls ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found