Review main Merged

95847[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
    • Oliver Klee +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 6

Review log 79

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

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

  3. Oliver Klee voted on patch set 1 CR +1 V +1 09/15/26, 10:10

  4. Stefan Bürk rebased onto patch set 2 CR +1 V +1 09/15/26, 10:34

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

  6. Oliver Klee voted on patch set 2 CR +1 V +1 09/15/26, 10:49

  7. Benni Mack voted on patch set 2 CR +1 V +1 09/15/26, 12:34

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

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