Skip to content

Fix Windows flake in CommandChannelDecoderTest (#3400) Backport of #3400 in surefire-3.5.x branch - #3403

Open
olamy wants to merge 1 commit into
apache:surefire-3.5.xfrom
olamy:surefire-3.5.x-pr-3400
Open

Fix Windows flake in CommandChannelDecoderTest (#3400) Backport of #3400 in surefire-3.5.x branch#3403
olamy wants to merge 1 commit into
apache:surefire-3.5.xfrom
olamy:surefire-3.5.x-pr-3400

Conversation

@olamy

@olamy olamy commented Jul 27, 2026

Copy link
Copy Markdown
Member

The test initializes DumpErrorSingleton into the JUnit @tempdir;
several tests write .dumpstream files there. On Windows a freshly
written file can be transiently locked (antivirus, indexer) right when
the @tempdir cleanup runs, failing the whole class with
DirectoryNotEmptyException ('Failed to close extension context').
JUnit 5.14's resilient cleanup retries do not close the gap. Writing
the dumps under target/ needs no post-test cleanup at all.

Co-authored-by: Gerd Aschemann ascheman@apache.org
Co-authored-by: Claude Fable 5 noreply@anthropic.com

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean install to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its clean install).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

Backport of apache#3400 in surefire-3.5.x branch

The test initializes DumpErrorSingleton into the JUnit @tempdir;
several tests write .dumpstream files there. On Windows a freshly
written file can be transiently locked (antivirus, indexer) right when
the @tempdir cleanup runs, failing the whole class with
DirectoryNotEmptyException ('Failed to close extension context').
JUnit 5.14's resilient cleanup retries do not close the gap. Writing
the dumps under target/ needs no post-test cleanup at all.

Co-authored-by: Gerd Aschemann <ascheman@apache.org>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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