You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Daniel Elsner (Jira)" <ji...@apache.org> on 2021/03/03 08:14:00 UTC

[jira] [Updated] (SUREFIRE-1891) Test isolation for forks does not apply to class loaders

     [ https://issues.apache.org/jira/browse/SUREFIRE-1891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Elsner updated SUREFIRE-1891:
------------------------------------
    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

- Surefire 3.0.0-M5

  was:
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.


> Test isolation for forks does not apply to class loaders
> --------------------------------------------------------
>
>                 Key: SUREFIRE-1891
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1891
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: classloading, Maven Surefire Plugin
>    Affects Versions: 3.0.0-M5
>            Reporter: Daniel Elsner
>            Priority: Major
>
> 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
> - Surefire 3.0.0-M5



--
This message was sent by Atlassian Jira
(v8.3.4#803005)