#110706SetCookieServiceTest leaks cookieDomain into following unit tests
Description
Since the global state backup of unit tests is limited to test classes which opt in with the BackupGlobals attribute (#110624), SetCookieServiceTest leaks its cookie domain configuration into the following tests.
The data provider of SetCookieServiceTest::removalUsesSameIdentityAndAttributesAsCreation, added with #107895, sets TYPO3_CONF_VARS SYS cookieDomain to .example.com for some data sets. The value is never reset, and the test class does not opt in to the global state backup.
When one of these data sets runs before UserSessionManagerTest in a randomized unit test run, the cookie scope of the session is resolved for example.com instead of the requested host example.org. The session JWT is rejected, an anonymous session is created, and UserSessionManagerTest::createFromRequestOrAnonymousCreatesProperSessionObjectForValidSessionJwt fails with: Failed asserting that null matches expected 13.
Steps to reproduce
bc. Build/Scripts/runTests.sh -s unit — —filter ‘SetCookieServiceTest|UserSessionManagerTest’ —order-by=random —random-order-seed=2
The core CI unitRandom jobs of main and 14.3 fail the same way, for example with the random seed 1789457529 on main. 13.4 is not affected, because the global state backup is still enabled for all unit tests there.
Solution
Let SetCookieServiceTest opt in to the global state backup.
Reviews 2
History 13
-
Gerrit Code Review pushed patch set 1 for main to change 95844 status
NewUnder Review <span data-processor="relativetime" data-value="2026-09-15T07:55:12+00:00" > 09/15/26, 07:55 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 95845 <span data-processor="relativetime" data-value="2026-09-15T07:55:17+00:00" > 09/15/26, 07:55 </span>
-
Stefan Bürk commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-15T08:15:09+00:00" > 09/15/26, 08:15 </span>
Applied in changeset commit:6afd093fbfa82f9d8ad1cc81230e96f5d1ff156c.