[Test] Use testRootDisposable instead of leaking test disposable in ApiTest

- `testDisposable` is already managed by `KtUsefulTestCase`, so disposal
  support comes for free. This replaces the previous `TestDisposable`,
  which was never disposed properly.

^KT-64099
This commit is contained in:
Marco Pennekamp
2023-12-05 20:58:11 +01:00
committed by Space Team
parent 3497809ebd
commit a4fc658fb3
@@ -129,7 +129,7 @@ class ApiTest : KotlinTestWithEnvironment() {
}
override fun createEnvironment(): KotlinCoreEnvironment {
return KotlinCoreEnvironment.createForTests(TestDisposable(), CompilerConfiguration(), EnvironmentConfigFiles.JS_CONFIG_FILES)
return KotlinCoreEnvironment.createForTests(testRootDisposable, CompilerConfiguration(), EnvironmentConfigFiles.JS_CONFIG_FILES)
}
}