#111306DataHandlerCacheFlushTest fails depending on the test order
Description
Problem
The functional test DataHandlerCacheFlushTest::updatedRecordsAreFlushedOnceAtTheEndOfTheDataHandlerRun fails in the pre-merge job “functional postgres 10 php 8.5”: AfterCacheFlushedEvent reports 7 records instead of the 2 expected tt_content records, the first ones being pages 5 and pages 4. The failure is not related to PostgreSQL, it depends on which test class runs before.
Steps to reproduce
- Run: ./Build/Scripts/runTests.sh -s functional -d sqlite typo3/sysext/recycler/Tests/Functional/Controller/RecyclerAjaxControllerTest.php typo3/sysext/core/Tests/Functional/Cache/Flush/DataHandlerCacheFlushTest.php
- Run DataHandlerCacheFlushTest.php alone: it passes.
Cause
DataHandler::$recordsToClearCacheFor is static and survives between test classes in one PHP process. DeletedRecords::deleteData() calls DataHandler::deleteAction() directly, so processClearCacheQueue() does not run and the queue stays filled. With 10 chunks, RecyclerAjaxControllerTest runs directly before DataHandlerCacheFlushTest, whose DataHandler run then flushes the leftover entries as well.
Proposed fix
Drain the queue in DataHandlerCacheFlushTest::setUp() with an empty DataHandler run, before the page tree fixture is imported and the event listener is registered. Other tests call DataHandler methods such as deleteAction() directly as well, so changing the recycler alone would leave the test dependent on the order.
Reviews 2
Related issues 1
History 23
-
Georg Ringer changed Related to #111263 <span data-processor="relativetime" data-value="2026-11-01T10:03:05+00:00" > 11/01/26, 10:03 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 97273 status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-01T10:03:35+00:00" > 11/01/26, 10:03 </span> -
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-11-01T10:25:14+00:00" > 11/01/26, 10:25 </span>
Applied in changeset commit:d1f2583f6750bc66e04e894deb89ce9bde49502a.