Date of Release: September ❓, 2018
Scope: Bug fixes since 5.3.0
For a complete list of all closed issues and pull requests for this release, consult the 5.3.1 milestone page in the JUnit repository on GitHub.
-
An
OutOfMemoryError
regression introduced in JUnit 5.3.0 has been fixed.-
Specifically, the
NodeTestTask
used by implementations ofHierarchicalTestEngine
(such as the Jupiter and Vintage test engines) no longer retains references to contextual state after a node has completed execution. This allows state such as instances of test classes to be properly garbage collected by the JVM. -
Previously, a
NodeTestTask
instance was created for eachTestDescriptor
before starting execution. Now they are created on the fly and can be garbage collected by the JVM after the enclosing container has finished.
-
-
Invocations of
assertThrows()
that are passed a method reference for an overloaded method with avoid
return type once again compile.-
For example, given an instance of
java.lang.Object
stored in a variable namedobject
,assertThrows(Exception.class, object::wait)
compiled against JUnit 5.2.0, failed to compile against JUnit 5.3.0, but now compiles against JUnit 5.3.1.
-