Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1891

Test isolation for forks does not apply to class loaders

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0-M5
    • Fix Version/s: None
    • Labels:
      None

      Description

      When running surefire with `forkCount=1` and `reuseForks=false`, the loaded `.class` files are cached across forks. Therefore, when one wants to analyze the behavior of specific tests (e.g., which `.class` files are loaded into the JVM by the test), results will be incomplete. 

      This has worked on older versions (I particularly tried `2.19.1`) and I am wondering whether this level of isolation was removed on purpose and if there is a way to manually return to the old default behavior of maximum isolation even for class loading.

      Using:

      • JDK 11 (Windows Server 2019 Datacenter)
      • Surefire 3.0.0-M5

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              delsner Daniel Elsner

              Dates

              • Created:
                Updated:

                Issue deployment