mirror of
https://github.com/sbt/sbt.git
synced 2026-09-01 18:47:14 +02:00
Three independent, pre-existing retention bugs kept the classloader of a finished in-process test run -- and the open jar handles it holds -- alive for the rest of the server session. - JUnitXmlTestsListener: testSuite is an InheritableThreadLocal, so threads spawned during a run (e.g. async-framework pool workers) inherit a copy of the suite reference that remove() cannot reach. - TestRecap.collect: the recap is stashed on State.attributes and outlives the command, so it must not retain live throwables. - ClassLoaderCache: loaders evicted from delegate by clearExpiredLoaders are unreachable from the map and never enqueued on the ReferenceQueue, so neither clear()/close() nor the cleanup thread could ever close them. SuiteResult now documents the retention hazard on throwables. Adds deterministic, cross-platform tests for all three severed chains.