Page MenuHomePhabricator

QUnit tests for ContentTranslation fail - unable to merge commits
Closed, ResolvedPublic

Description

https://integration.wikimedia.org/ci/job/mwext-ContentTranslation-qunit/1688/console for https://gerrit.wikimedia.org/r/#/c/198544/:

09:35:47 Chromium 41.0.2272 (Ubuntu) ext.uls Common languages FAILED
09:35:47 	Died on test #1
09:35:47 Chromium 41.0.2272 (Ubuntu): Executed 291 of 291 (1 FAILED) (16.41 secs / 16.295 secs)
09:35:47 Warning: Task "karma:main" failed. Use --force to continue.
09:35:47 
09:35:47 Aborted due to warnings.

Event Timeline

Nemo_bis raised the priority of this task from to High.
Nemo_bis updated the task description. (Show Details)
Nemo_bis subscribed.
Nikerabbit renamed this task from Chromium 41.0.2272 (Ubuntu) ext.uls Common languages FAILED to QUnit tests for ContentTranslation fail - unable to merge commits.Mar 23 2015, 8:50 AM
Nikerabbit raised the priority of this task from High to Unbreak Now!.
Nikerabbit updated the task description. (Show Details)
Nikerabbit removed subscribers: Nikerabbit, hashar, KartikMistry.

There are errors such as ERROR: '[earthquake] Url exceeds maximum length' in the log but I am not sure if those are the cause, and if they are, I don't think it is related to any code change in CX. We need help to figure out what is causing the failures.

PS: Phabricator doesn't handle edit conflicts at all it seems.

ext.uls Common languages FAILED

Would it mean it is an issue in ULS? The console log shows an TypeError: undefined is not a function, might be some api change? Please try to reproduce it locally with ContentTranslation and ULS installed.

The TypeError: undefined is not a function refers to checkCssHandles in mediawiki.js. No very recent changes in that file either.

I am not able to reproduce this locally. Tests are passing.

Approaching what Jenkins does (latest master of: MediaWiki core, ContentTranslation, UniversalLanguageSelector, EventLogging) I can reproduce the error.

Running Special:JavaScriptTest/qunit passes, but Special:JavaScriptTest/qunit/plain shows the failure.

Most likely there is an accidental link between test code and something the Skin or OutputPage provides (instead of mocking, stubbing or using an html fixture).

Test failure: ext.uls: Common languages

> TypeError: mw.uls.getFrequentLanguageList is not a function
>    at Object.<anonymous>
> (http://mediawiki.dev/extensions/UniversalLanguageSelector/tests/qunit/ext.uls.tests.js:87:26)

So it seems the error is caused by UniversalLanguageSelector (which ContentTranslation uses).

Searching for it: getFrequentLanguageList @wikimedia shows it is defined in ext.uls.init.js; which is part of module "ext.uls.interface".

This module is not loaded by the test suite according to a search for "ext.uls.interface".

The test should either not depend on this init code (preferable), or add a dependency on this module in test suite registration.

Change 199193 had a related patch set uploaded (by Santhosh):
Add missing RL dependency ext.uls.init to test module ext.uls.tests

https://gerrit.wikimedia.org/r/199193

Change 199193 merged by jenkins-bot:
Add missing RL dependency ext.uls.init to test module ext.uls.tests

https://gerrit.wikimedia.org/r/199193

santhosh claimed this task.

Change 199207 had a related patch set uploaded (by KartikMistry):
Add missing RL dependency ext.uls.init to test module ext.uls.tests

https://gerrit.wikimedia.org/r/199207

Change 199208 had a related patch set uploaded (by KartikMistry):
Add missing RL dependency ext.uls.init to test module ext.uls.tests

https://gerrit.wikimedia.org/r/199208

Change 199207 merged by jenkins-bot:
Add missing RL dependency ext.uls.init to test module ext.uls.tests

https://gerrit.wikimedia.org/r/199207

Change 199208 merged by jenkins-bot:
Add missing RL dependency ext.uls.init to test module ext.uls.tests

https://gerrit.wikimedia.org/r/199208

I haven't seen that error in a while, if that is what you are asking.

Sorry I have missed the fact this task has been closed by Santhosh back on March 24th