[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:
committed by
Space Team
parent
3497809ebd
commit
a4fc658fb3
@@ -129,7 +129,7 @@ class ApiTest : KotlinTestWithEnvironment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun createEnvironment(): KotlinCoreEnvironment {
|
override fun createEnvironment(): KotlinCoreEnvironment {
|
||||||
return KotlinCoreEnvironment.createForTests(TestDisposable(), CompilerConfiguration(), EnvironmentConfigFiles.JS_CONFIG_FILES)
|
return KotlinCoreEnvironment.createForTests(testRootDisposable, CompilerConfiguration(), EnvironmentConfigFiles.JS_CONFIG_FILES)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user