Skip to content

Slow performance for Path and File assertions tests #2567

Description

@scordio

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions