Skip to content

Release test watcher references as each test finishes

Choose a tag to compare

@sbabcoc sbabcoc released this 02 May 21:04
· 94 commits to master since this release

In this release, I added code to release references to test watchers as each test finishes. Prior to this release, these references were retained for the lifetime of the JVM executing the tests, which had the potential to exhaust available memory. For example, each JUnit Foundation unit test attaches a test watcher that retains a reference to the test class instance that created it. Because these references were never explicitly released, test class instances would accumulate during the course of test execution, causing memory consumption to escalate as more tests ran.

NOTE: I tagged this as a major-version release due to the remote possibility that someone besides me was relying on the ability to interact with test watchers after the associated atomic test has finished. Managing these references is now the responsibility of the client.