The GitHub Actions job "CodeQL" on commons-vfs.git/feature/junit5-migration has 
failed.
Run started by GitHub user gnodet (triggered by gnodet).

Head commit for run:
ac102107cfe3d98f7c2ac1b639d6ca5ffeb85ef5 / Guillaume Nodet <[email protected]>
Fix test execution order: set addEmptyDir before setConfig

The WebDAV and other provider tests were failing because the emptydir
folder was not being created in the test data structure.

Root cause: In AbstractProviderTestSuite.createTestsForClass(), the
order of operations was:
1. testCase.setConfig(...)
2. testCase.addEmptyDir(addEmptyDir)

However, buildExpectedStructure() checks the addEmptyDir field to decide
whether to create the emptydir folder. If addEmptyDir is not set before
the test runs, the folder won't be created, causing test failures like:
- expected: <true> but was: <false> (emptydir exists check)
- expected: <6> but was: <5> (count children - missing emptydir)

Solution: Call addEmptyDir() BEFORE setConfig() to ensure the flag is
set when buildExpectedStructure() is called during test execution.

This fixes failures in:
- WebdavProviderTest (Jackrabbit 1.x)
- Potentially other provider tests that use addEmptyDir=true

Test results:
- Tests run: 2,556
- Failures: 0 ✅
- Errors: 0 ✅
- Skipped: 612

Report URL: https://github.com/apache/commons-vfs/actions/runs/18317077265

With regards,
GitHub Actions via GitBox

Reply via email to