Page MenuHomePhabricator

Make DataAccessSnakFormatterOutputFormatTest more robust
Open, Needs TriagePublic

Description

It appears that DataAccessSnakFormatterOutputFormatTest can fail in certain circumstances.
When certain code is run before this test is, the tests suddenly start to fail.

Apparently, even though a new 'reset' client (WikibaseClient::getDefaultInstance( 'reset' )) is constructed, it doesn't appear that the client is completely reset & some code still sticks around.
The tests can be made to fail by adding this to setUp:

WikibaseClient::getDefaultInstance()->getDataAccessSnakFormatterFactory()->newWikitextSnakFormatter( Language::factory( 'en' ), new HashUsageAccumulator() );

More details can be found on this patchset, in Lucas' notes on PS9: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseMediaInfo/+/556981/9

Details

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 558071 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Reset WikibaseClient more completely

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

Change 558071 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Reset WikibaseClient more completely

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