Page MenuHomePhabricator

UTSysop is not a sysop
Closed, ResolvedPublic

Description

Quoting https://gerrit.wikimedia.org/r/#/c/282735/,

Iec4ed4c8 made it so addCoreDBData() only gets called once. Which is
nice, except for the fact that it means any test that puts
'user_groups' into $this->tablesUsed is going to cause UTSysop to no
longer be a sysop, so any later test that expects it to be one is going
to mysteriously fail.

Fix is blocked by some tests (GatherTests, ApiEchoNotificationsTest, EchoDiscussionParserTest) relying on this (or at least on user tables not being cleaned up properly between tests).

Details

Related Gerrit Patches:
mediawiki/extensions/AntiSpoof : REL1_27Use $tablesUsed rather than manually deleting all rows from the 'user' table
mediawiki/extensions/AntiSpoof : masterUse $tablesUsed rather than manually deleting all rows from the 'user' table
mediawiki/core : masterFix core DB data in unit testing
mediawiki/extensions/Gather : masterReset Gather tables between tests
mediawiki/extensions/Echo : masterRecreate test users for every test
mediawiki/core : masterAdd StubAuthPlugin
mediawiki/extensions/Gather : masterRecreate test users after every test

Event Timeline

Tgr created this task.Apr 11 2016, 11:03 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 11 2016, 11:03 PM

Change 282735 had a related patch set uploaded (by Gergő Tisza):
Fix core DB data in unit testing

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

Anomie added a subscriber: Anomie.Apr 12 2016, 1:16 PM

Change 282940 had a related patch set uploaded (by Gergő Tisza):
Recreate test users after every test

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

Change 282940 merged by jenkins-bot:
Recreate test users after every test

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

Change 282954 had a related patch set uploaded (by Anomie):
Recreate test users for every test

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

Change 282956 had a related patch set uploaded (by Gergő Tisza):
Reset Gather tables between tests

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

Change 282954 merged by jenkins-bot:
Recreate test users for every test

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

Change 282956 merged by jenkins-bot:
Reset Gather tables between tests

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

Change 282735 merged by jenkins-bot:
Fix core DB data in unit testing

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

Anomie closed this task as Resolved.Apr 12 2016, 5:40 PM
Anomie claimed this task.
Tgr reopened this task as Open.May 27 2016, 5:07 PM

This is happening again:

16:51:34 There were 3 failures:
16:51:34 
16:51:34 1) AntiSpoofPreAuthenticationProviderTest::testGetAuthenticationRequests with data set #4 ('create', array(true), 'UTSysop', array(AntiSpoofAuthenticationRequest Object (...)))
16:51:34 Failed asserting that two arrays are equal.
16:51:34 --- Expected
16:51:34 +++ Actual
16:51:34 @@ @@
16:51:34  Array (
16:51:34 -    0 => AntiSpoofAuthenticationRequest Object (...)
16:51:34  )
16:51:34 
16:51:34 /mnt/jenkins-workspace/workspace/mwext-testextension-php55/src/extensions/AntiSpoof/tests/AntiSpoofPreAuthenticationProviderTest.php:26
16:51:34 /mnt/jenkins-workspace/workspace/mwext-testextension-php55/src/tests/phpunit/MediaWikiTestCase.php:390
16:51:34 
16:51:34 2) AntiSpoofPreAuthenticationProviderTest::testTestForAccountCreation with data set "illegal, sysop skipping" (true, false, array(), User Object (...), array(AntiSpoofAuthenticationRequest Object (...)), null)
16:51:34 Failed asserting that false is true.
16:51:34 
16:51:34 /mnt/jenkins-workspace/workspace/mwext-testextension-php55/src/extensions/AntiSpoof/tests/AntiSpoofPreAuthenticationProviderTest.php:68
16:51:34 /mnt/jenkins-workspace/workspace/mwext-testextension-php55/src/tests/phpunit/MediaWikiTestCase.php:390
16:51:34 
16:51:34 3) AntiSpoofPreAuthenticationProviderTest::testTestForAccountCreation with data set "conflicts w/ skipping" (true, true, array('x'), User Object (...), array(AntiSpoofAuthenticationRequest Object (...)), null)
16:51:34 Failed asserting that false is true.
16:51:34 
16:51:34 /mnt/jenkins-workspace/workspace/mwext-testextension-php55/src/extensions/AntiSpoof/tests/AntiSpoofPreAuthenticationProviderTest.php:68
16:51:34 /mnt/jenkins-workspace/workspace/mwext-testextension-php55/src/tests/phpunit/MediaWikiTestCase.php:390

Change 291298 had a related patch set uploaded (by Anomie):
[DO NOT MERGE] Testing for T132411

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

Change 291309 had a related patch set uploaded (by Anomie):
Use $tablesUsed rather than manually deleting all rows from the 'user' table

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

Change 291309 merged by jenkins-bot:
Use $tablesUsed rather than manually deleting all rows from the 'user' table

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

Anomie closed this task as Resolved.May 27 2016, 7:30 PM

https://gerrit.wikimedia.org/r/#/c/288902/ PS4 seems to indicate this is fixed now.

Change 291298 abandoned by Anomie:
[DO NOT MERGE] Testing for T132411

Reason:
Done with the testing, it worked well.

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

Change 293786 had a related patch set uploaded (by Gergő Tisza):
Use $tablesUsed rather than manually deleting all rows from the 'user' table

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

Change 293786 merged by jenkins-bot:
Use $tablesUsed rather than manually deleting all rows from the 'user' table

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