Page MenuHomePhabricator

Jenkins: PhantomJS false QUnit test failures (compared to real browser)
Closed, ResolvedPublic

Description

Extension EventLogging's qunit tests are failing in zuul+Jenkins, yet passing in both Firefox and Chromium. See e.g.

https://integration.wikimedia.org/ci/job/mwext-EventLogging-qunit/4/consoleFull

One of the failures is "1372109891198 is a timestamp" being false. The code in question boils down to

var value = new Date().getTime();

return value instanceof Date || (
        typeof value === 'number' &&
        value >= 0 &&
        value % 1 === 0 );

which seems legit.

in my phantomjs 1.6.0 (old version) REPL loop,

value = new Date().getTime();

prints

'value = new Date.getTime();' is a cyclic structure

Maybe this is the cause. If so, a workaround is to use

value = (new Date()).getTime();

I haven't looked at the other error cases.


Version: unspecified
Severity: normal

Details

Reference
bz50138

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:01 AM
bzimport set Reference to bz50138.
bzimport added a subscriber: Unknown Object (MLST).

Not sure if the component should beQA or Continuous Integration.

It runs tests in PhantomJS which uses a slightly outdated version of WebKit and JavaScriptCore. If this is failing there, it is likely failing in old WebKit for real.

In general this should be a bug against the component where the test resides as a todo to fix it in the code because there's nothing we can realistically do about it from our end.

  • This bug has been marked as a duplicate of bug 49513 ***

(In reply to comment #1)

Not sure if the component should beQA or Continuous Integration.

Anything triggered by Zuul would fall under Continuous Integration. QA is more about Selenium tests and leading the overall QA effort of which CI is just a "tiny" part :-)