RFR: 8368156: java/nio/file/Files/IsSameFile.java failing (win)
Brian Burkhalter
bpb at openjdk.org
Tue Sep 23 15:39:01 UTC 2025
On Tue, 23 Sep 2025 07:12:51 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
> Maybe you can remove _all_ invocations of `deleteFiles()` and instead simply annotate `deleteFiles()` with `@BeforeEach`.
This will not work. The order of execution is
MethodSource - generates stream or arguments
BeforeEach
Test - tests first argument of stream
AfterEach
BeforeEach
Test - tests second argument of stream
AfterEach
etc.
The `MethodSource` creates all file system objects which are needed by the tests, so if they are deleted in a method annoted `@*Each`, then they will be unavailable for all but the test of the first argument.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27440#discussion_r2372738965
More information about the nio-dev
mailing list