Skip to content

[6.x] Flush the file cache after each mounting test - #15387

Merged
jasonvarga merged 1 commit into
6.xfrom
mounting-test-cache-cleanup
Sep 7, 2026
Merged

[6.x] Flush the file cache after each mounting test#15387
jasonvarga merged 1 commit into
6.xfrom
mounting-test-cache-cleanup

Conversation

@duncanmcclean

Copy link
Copy Markdown
Member

This pull request fixes an issue where IncludeNocacheTest and HalfMeasureStaticCachingTest fail with 404s whenever MountingTest runs earlier in the same process.

This was happening because MountingTest switches to the file cache driver and clears it before each test, but never after. Any later test using the file driver then reads the Stache from stale entries on disk, so pages like /about don't exist. Which tests share a process depends on how the shards are split, so this only showed up on the Windows shards of #15385, where adding a test file shifted MountingTest ahead of IncludeNocacheTest.

This PR fixes it by flushing the file store in MountingTest's tearDown().

You can reproduce it on 6.x with:

./vendor/bin/phpunit tests/Feature/Entries/MountingTest.php tests/StaticCaching/IncludeNocacheTest.php

Related: #15385

`MountingTest` switches to the `file` cache driver and only clears it before each test, leaving stale stache entries on disk for later tests that use the same driver.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015MAdoF7RTBQ4mUTaki7k2e
@jasonvarga
jasonvarga merged commit 260e8be into 6.x Sep 7, 2026
65 checks passed
@jasonvarga
jasonvarga deleted the mounting-test-cache-cleanup branch September 7, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants