-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Description
Overview
Whenever a test case sets the thread context ClassLoader
, the test runner thread keeps using that ClassLoader
for the following tests. This causes failures when combined with Mockito and mocks of package private classes/interfaces.
Expected Behavior
When the thread is reused to run another test, the context ClassLoader
should be reset to the original one.
Steps to Reproduce
To reproduce the problem I created this example repo: https://github.com/bacer-esteco/junit5-bug-report.
Just run the 'test' task.
This problem is reproducible using both Jupiter and Vintage (tried on version 5.4.0), launching the test both from Gradle 5.2.1 and IntelliJ IDEA 2018.3 (and previous).
Related Issues
smola