Page MenuHomePhabricator

Refactor CirrusSearch AnalysisConfigBuilder Tests & Fixtures
Closed, ResolvedPublic3 Estimated Story Points

Description

User Story: As a developer, I want the main AnalysisConfigBuilder test fixtures to reflect our primary use case for AnalysisConfigBuilder (i.e., the production configuration).

Our current tests give good coverage of the code and possible configuration options, including configurations we don't actually use in production. However, the default fixtures use a weird mix of configuration options that have accidentally evolved over time, which do not reflect the current production configuration. This leads to confusion when making changes, since most of the test fixtures don't look like what we expect as "normal" for a given language.

For example, in the recent dotted_I_fix (T358495) patch, the filter was mostly deleted from fixtures because the default tests don't use the ICU plugin, and the filter is only necessary when that plugin is installed. So while it will be enabled for most languages in production, it is only enabled for the one fixture that explicitly enables the ICU plugin.

Acceptance Criteria

  • Update default test fixtures to reflect production configuration
  • Include tests for other configurations (e.g., with different plugins installed)
  • Ensure overall test code coverage stays the same or better

Event Timeline

TJones set the point value for this task to 5.
TJones moved this task from Incoming to In Progress on the Discovery-Search (Current work) board.
TJones changed the point value for this task from 5 to 3.Apr 3 2024, 7:20 PM

Change #1017084 had a related patch set uploaded (by Tjones; author: Tjones):

[mediawiki/extensions/CirrusSearch@master] Refactor Language Analysis Tests & Fixtures

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

Change #1017084 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@master] Refactor Language Analysis Tests & Fixtures

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