Page MenuHomePhabricator

Flaky test 'TemporaryPasswordPrimaryAuthenticationProviderTest::testProviderChangeAuthenticationDataEmail'
Closed, ResolvedPublic

Description

About every 5th build, this fails in the last 2 days.

https://integration.wikimedia.org/ci/job/mediawiki-phpunit-php55-trusty/2169/console

1) MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest::testProviderChangeAuthenticationDataEmail
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
[email protected]
[email protected]

/home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/tests/phpunit/includes/auth/TemporaryPasswordPrimaryAuthenticationProviderTest.php:575
/home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/includes/Hooks.php:195
/home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/includes/mail/UserMailer.php:337
/home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/includes/mail/UserMailer.php:189
/home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/includes/user/User.php:4353
/home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php:465
/home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php:310
/home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/includes/libs/rdbms/database/Database.php:2537
/home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/includes/libs/rdbms/database/Database.php:2469
/home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php:313
/home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/tests/phpunit/includes/auth/TemporaryPasswordPrimaryAuthenticationProviderTest.php:579
/home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/tests/phpunit/MediaWikiTestCase.php:388
/home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/maintenance/doMaintenance.php:110

Code:
https://github.com/wikimedia/mediawiki/blob/854a462dc0aef59e1c26c057792b8a9214449af5/tests/phpunit/includes/auth/TemporaryPasswordPrimaryAuthenticationProviderTest.php#L516-L575

Looks like something caused by a change in User, Database, DeferredUpdated, ScopedCallback, or Hooks.

Event Timeline

Probably broken by 74516df although I have no idea what would cause it to be non-deterministic. (That the test uses an immutable TestUser but changes it probably does not help either.)

Change 313209 had a related patch set uploaded (by Anomie):
Clean up use of UTSysop in TemporaryPasswordPrimaryAuthenticationProviderTest

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

Change 313209 merged by jenkins-bot:
Clean up use of UTSysop in TemporaryPasswordPrimaryAuthenticationProviderTest

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