With the changes introduced in d391e20 and b22ba74, Path and File assertions tests are hitting the file system as they use JUnit's @TempDir, and this has degraded the overall performance of the test suite, getting even worse when Jacoco is enabled (jacoco/jacoco#1344).
Hitting the file system is probably not always needed, especially when working locally. An in-memory file system implementation might provide sufficient confidence and would run much faster, while the CI could verify the actual integration with a real file system.
Currently, there is no elegant solution for simply changing the file system used by @TempDir, so a smart class hierarchy with some configuration parameters might need to be added to support both an in-memory and a real file system.
However, junit-team/junit-framework#2400 and especially junit-team/junit-framework#2400 (comment) might be a better solution for this issue.
With the changes introduced in d391e20 and b22ba74,
PathandFileassertions tests are hitting the file system as they use JUnit's@TempDir, and this has degraded the overall performance of the test suite, getting even worse when Jacoco is enabled (jacoco/jacoco#1344).Hitting the file system is probably not always needed, especially when working locally. An in-memory file system implementation might provide sufficient confidence and would run much faster, while the CI could verify the actual integration with a real file system.
Currently, there is no elegant solution for simply changing the file system used by
@TempDir, so a smart class hierarchy with some configuration parameters might need to be added to support both an in-memory and a real file system.However, junit-team/junit-framework#2400 and especially junit-team/junit-framework#2400 (comment) might be a better solution for this issue.