Page MenuHomePhabricator

Tests fail when other extensions add modules
Closed, ResolvedPublic

Description

Some tests can fail if other extensions are installed, see log below. The tests check that no modules are loaded, but should check that no Wikispeech modules (ext.wikispeech.*) are loaded.

1$ dev/phpunit.sh
2Using PHP 7.2.22-1+0~20190902.26+debian9~1.gbpd64eb7+wmf1
3PHPUnit 8.5.8 by Sebastian Bergmann and contributors.
4
5............................................................... 63 / 156 ( 40%)
6...................................FFFFFF.F.................... 126 / 156 ( 80%)
7.............................. 156 / 156 (100%)
8
9Time: 56.03 seconds, Memory: 56.25 MB
10
11There were 7 failures:
12
131) MediaWiki\Wikispeech\Tests\WikispeechHooksTest::testOnBeforePageDisplayDontLoadModulesIfWrongNamespace
14Failed asserting that an array is empty.
15
16/vagrant/mediawiki/extensions/Wikispeech/tests/phpunit/WikispeechHooksTest.php:107
17/vagrant/mediawiki/tests/phpunit/MediaWikiIntegrationTestCase.php:437
18/vagrant/mediawiki/maintenance/doMaintenance.php:106
19=== Logs generated by test case
20[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
21[localisation] [debug] LocalisationCache using store LCStoreNull []
22[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
23[Wikispeech] [info] MediaWiki\Wikispeech\Hooks\WikispeechHooks::shouldWikispeechRun: Not loading Wikispeech: unsupported namespace. []
24===
25
262) MediaWiki\Wikispeech\Tests\WikispeechHooksTest::testOnBeforePageDisplayDontLoadModulesIfWikispeechDisabled
27Failed asserting that an array is empty.
28
29/vagrant/mediawiki/extensions/Wikispeech/tests/phpunit/WikispeechHooksTest.php:115
30/vagrant/mediawiki/tests/phpunit/MediaWikiIntegrationTestCase.php:437
31/vagrant/mediawiki/maintenance/doMaintenance.php:106
32=== Logs generated by test case
33[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
34[localisation] [debug] LocalisationCache using store LCStoreNull []
35[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
36[Wikispeech] [info] MediaWiki\Wikispeech\Hooks\WikispeechHooks::shouldWikispeechRun: Not loading Wikispeech: disabled by user. []
37===
38
393) MediaWiki\Wikispeech\Tests\WikispeechHooksTest::testOnBeforePageDisplayDontLoadModulesIfLackingRights
40Failed asserting that an array is empty.
41
42/vagrant/mediawiki/extensions/Wikispeech/tests/phpunit/WikispeechHooksTest.php:123
43/vagrant/mediawiki/tests/phpunit/MediaWikiIntegrationTestCase.php:437
44/vagrant/mediawiki/maintenance/doMaintenance.php:106
45=== Logs generated by test case
46[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
47[localisation] [debug] LocalisationCache using store LCStoreNull []
48[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
49[Wikispeech] [info] MediaWiki\Wikispeech\Hooks\WikispeechHooks::shouldWikispeechRun: Not loading Wikispeech: user lacks right "wikispeech-listen". []
50===
51
524) MediaWiki\Wikispeech\Tests\WikispeechHooksTest::testOnBeforePageDisplayDontLoadModulesIfServerUrlInvalid
53Failed asserting that an array is empty.
54
55/vagrant/mediawiki/extensions/Wikispeech/tests/phpunit/WikispeechHooksTest.php:133
56/vagrant/mediawiki/tests/phpunit/MediaWikiIntegrationTestCase.php:437
57/vagrant/mediawiki/maintenance/doMaintenance.php:106
58=== Logs generated by test case
59[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
60[localisation] [debug] LocalisationCache using store LCStoreNull []
61[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
62[localisation] [debug] LocalisationCache using store LCStoreNull []
63[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
64[Wikispeech] [warning] MediaWiki\Wikispeech\Hooks\WikispeechHooks::validateConfiguration: Configuration value for 'WikispeechSpeechoidUrl' is not a valid URL: {value} {"value":"invalid-url"}
65[Wikispeech] [info] MediaWiki\Wikispeech\Hooks\WikispeechHooks::shouldWikispeechRun: Not loading Wikispeech: config invalid. []
66===
67
685) MediaWiki\Wikispeech\Tests\WikispeechHooksTest::testOnBeforePageDisplayDontLoadModulesIfRevisionNotAccessible
69Failed asserting that an array is empty.
70
71/vagrant/mediawiki/extensions/Wikispeech/tests/phpunit/WikispeechHooksTest.php:141
72/vagrant/mediawiki/tests/phpunit/MediaWikiIntegrationTestCase.php:437
73/vagrant/mediawiki/maintenance/doMaintenance.php:106
74=== Logs generated by test case
75[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
76[localisation] [debug] LocalisationCache using store LCStoreNull []
77[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
78[Wikispeech] [info] MediaWiki\Wikispeech\Hooks\WikispeechHooks::shouldWikispeechRun: Not loading Wikispeech: non-current revision. []
79===
80
816) MediaWiki\Wikispeech\Tests\WikispeechHooksTest::testOnBeforePageDisplay_invalidPageContentLanguage_dontLoadModule
82Failed asserting that an array is empty.
83
84/vagrant/mediawiki/extensions/Wikispeech/tests/phpunit/WikispeechHooksTest.php:148
85/vagrant/mediawiki/tests/phpunit/MediaWikiIntegrationTestCase.php:437
86/vagrant/mediawiki/maintenance/doMaintenance.php:106
87=== Logs generated by test case
88[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
89[localisation] [debug] LocalisationCache using store LCStoreNull []
90[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
91[localisation] [debug] LocalisationCache using store LCStoreNull []
92[localisation] [debug] LocalisationCache::isExpired(sv): cache missing, need to make one []
93[localisation] [debug] LocalisationCache::recache: got localisation for sv from source []
94[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
95[ContentHandler] [info] Registered handler for wikitext: WikitextContentHandler []
96[Wikispeech] [info] MediaWiki\Wikispeech\Hooks\WikispeechHooks::shouldWikispeechRun: Not loading Wikispeech: unsupported language. []
97===
98
997) MediaWiki\Wikispeech\Tests\WikispeechHooksTest::testOnBeforePageDisplay_actionIsntView_dontLoadModule
100Failed asserting that an array is empty.
101
102/vagrant/mediawiki/extensions/Wikispeech/tests/phpunit/WikispeechHooksTest.php:162
103/vagrant/mediawiki/tests/phpunit/MediaWikiIntegrationTestCase.php:437
104/vagrant/mediawiki/maintenance/doMaintenance.php:106
105=== Logs generated by test case
106[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
107[localisation] [debug] LocalisationCache using store LCStoreNull []
108[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
109[objectcache] [debug] fetchOrRegenerate(global:revision-row-1.29:wiki-unittest_:3:8): miss, new value computed []
110[objectcache] [debug] fetchOrRegenerate(global:NameTableSqlStore:slot_roles:wiki-unittest_): miss, new value computed []
111[objectcache] [debug] fetchOrRegenerate(global:NameTableSqlStore:content_models:wiki-unittest_): miss, new value computed []
112[objectcache] [debug] fetchOrRegenerate(wiki-unittest_:page-content-model:8): miss, new value computed []
113[ContentHandler] [info] Registered handler for wikitext: WikitextContentHandler []
114[Wikispeech] [info] MediaWiki\Wikispeech\Hooks\WikispeechHooks::shouldWikispeechRun: Not loading Wikispeech: unsupported action. []
115===
116
117FAILURES!
118Tests: 156, Assertions: 437, Failures: 7.

Event Timeline

Change 668120 had a related patch set uploaded (by Sebastian Berlin (WMSE); owner: Sebastian Berlin (WMSE)):
[mediawiki/extensions/Wikispeech@master] Preview transcriptions on EditLexicon special page

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

Change 668120 merged by jenkins-bot:
[mediawiki/extensions/Wikispeech@master] Preview transcriptions on EditLexicon special page

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