Directory

⚓ T341949 ApiStashEditTest fails if temporary user accounts are enabled
Page MenuHomePhabricator

ApiStashEditTest fails if temporary user accounts are enabled
Closed, ResolvedPublic

Description

To reproduce:

  • Add $wgAutoCreateTempUser['enabled'] = true; to your LocalSettings.php
  • Run ApiStashEditTest::testCheckCacheOldNoEditsAnon

it fails with:

Attempt to read property "output" on bool
 /var/www/html/w/tests/phpunit/includes/api/ApiStashEditTest.php:379
 /var/www/html/w/tests/phpunit/includes/api/ApiStashEditTest.php:398
 /var/www/html/w/tests/phpunit/includes/api/ApiTestCase.php:277
 /var/www/html/w/tests/phpunit/MediaWikiIntegrationTestCase.php:527

It looks like there's a cache key mismatch, but since the test is messing with the cache key in doStashOld, maybe it should just be fixed not to be hacky.

Event Timeline

And other tests in ApiStashEditTest fail in other ways when testing anons. I'll override the config for those, although eventually I assume we'll want to test both scenarios.

Change 938446 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/core@master] Make ApiStashEditTest work if temp users are enabled

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

Change 938446 merged by jenkins-bot:

[mediawiki/core@master] Make ApiStashEditTest work if temp users are enabled

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