Fix project leaking in tests

The project was leaking via MockApplication -> LowMemoryWatcherManager -> List<Project>
It happened due to unregistered disposable provided to the MockApplication
This commit is contained in:
Ilya Kirillov
2021-07-21 19:48:40 +02:00
committed by teamcityserver
parent f19dfd9d2a
commit 77fcb12af8
2 changed files with 9 additions and 1 deletions
@@ -76,6 +76,7 @@ abstract class AbstractLowLevelApiTest : TestWithDisposable() {
protected fun runTest(path: String) {
testDataPath = Paths.get(path)
val testConfiguration = testConfiguration(path, configure)
Disposer.register(disposable, testConfiguration.rootDisposable)
val testServices = testConfiguration.testServices
val moduleStructure = testConfiguration.moduleStructureExtractor.splitTestDataByModules(
path,