Review 14.3 Merged

95856[TASK] Stop unit tests leaking global state

Stefan Bürk CR +2 V +2 Easy +29 −0 updated 09/15/26, 13:17

Commit message

Since the global state backup of unit tests is opt-in, some unit
tests leave global state behind, which breaks following tests in
randomized unit test runs:

- ImageScriptServiceTest, IndexerTest, FileContentParserTest and
  YouTubeRendererTest set TYPO3_REQUEST without unsetting it. The
  global state backup cannot restore these request objects, which
  lets tests like QueryFactoryTest fail.
- RedisSessionBackendTest and PasswordGeneratorTest change
  TYPO3_CONF_VARS without opting in to the global state backup.

The request is now unset on tear down, and the tests changing
configuration opt in to the global state backup.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
  • Verified V +2 Done
    • Stefan Bürk +2
    • core-ci +1 CI

Issues 2

Files 6

Review log 34

  1. Stefan Bürk uploaded patch set 1 09/15/26, 13:06

  2. core-ci voted on patch set 1 V +1 09/15/26, 13:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108619

  3. Stefan Bürk voted on patch set 1 CR +2 V +2 09/15/26, 13:17

  4. Stefan Bürk merged patch set 2 09/15/26, 13:17