Skip to content

test: keep FileHandlerTest::testSaveMode inside its own cache directory - #10687

Merged
paulbalandan merged 1 commit into
codeigniter4:developfrom
paulbalandan:file-handler-test-save-mode
Oct 30, 2026
Merged

paulbalandan merged 1 commit into
codeigniter4:developfrom
paulbalandan:file-handler-test-save-mode

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
Fixes a flaky InfoCacheTest::testInfoCacheCanSeeFoo in the random test execution workflow, where cache:info printed an empty table after foo was saved.

testSaveMode replaced $this->handler with one using the default writable/cache/ path. tearDown() then called clean() on that handler, which deletes recursively, so it removed the files of any other test using a subdirectory of writable/cache/. The workflow runs components in parallel, so this could hit the Commands tests while Cache was running.

The test now uses $this->config, which already points at the test's own directory.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@carson-codeigniter4 carson-codeigniter4 Bot added the testing Pull requests that changes tests only label Oct 30, 2026
@paulbalandan
paulbalandan merged commit 609d458 into codeigniter4:develop Oct 30, 2026
58 checks passed
@paulbalandan
paulbalandan deleted the file-handler-test-save-mode branch October 30, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Pull requests that changes tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants