From b1ab597616711b27e184f80531bb46a31a357446 Mon Sep 17 00:00:00 2001 From: "Aleksei.Cherepanov" Date: Tue, 1 Jun 2021 13:37:56 +0300 Subject: [PATCH] Fix FIR tests after ee45aa6b --- .../org/jetbrains/kotlin/incremental/storage/BasicMap.kt | 7 ++++++- .../kotlin/incremental/snapshots/FileSnapshotMapTest.kt | 2 +- .../incremental/storage/SourceToOutputFilesMapTest.kt | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/build-common/src/org/jetbrains/kotlin/incremental/storage/BasicMap.kt b/build-common/src/org/jetbrains/kotlin/incremental/storage/BasicMap.kt index b935ef3962c..cbeb4869627 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/storage/BasicMap.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/storage/BasicMap.kt @@ -48,10 +48,15 @@ abstract class BasicMap, V>( } // avoid unsynchronized close - internal fun close() { + fun close() { storage.close() } + @TestOnly + fun closeForTest() { + close() + } + @TestOnly fun dump(): String { return with(StringBuilder()) { diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotMapTest.kt b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotMapTest.kt index ec598b19b14..5ddcffaefd2 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotMapTest.kt +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotMapTest.kt @@ -31,7 +31,7 @@ class FileSnapshotMapTest : TestWithWorkingDir() { @After override fun tearDown() { snapshotMap.flush(false) - snapshotMap.close() + snapshotMap.closeForTest() super.tearDown() } diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/storage/SourceToOutputFilesMapTest.kt b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/storage/SourceToOutputFilesMapTest.kt index 240f870951f..b645fe017b6 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/storage/SourceToOutputFilesMapTest.kt +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/storage/SourceToOutputFilesMapTest.kt @@ -29,7 +29,7 @@ class SourceToOutputFilesMapTest : TestWithWorkingDir() { @After override fun tearDown() { stofMap.flush(false) - stofMap.close() + stofMap.closeForTest() super.tearDown() }