[LL FIR] Test resolve extension disposal after modification events
- These tests simply ensure that a resolve extension is disposed after any kind of modification event is raised. It's not meant to test complex scenarios, but rather to detect when resolve extension disposal isn't invoked *at all*. - I tried implementing a similar test for resolve extension disposal after soft reference garbage collection, but the only way to force the GC to collect soft references is to allocate memory until an out-of-memory error occurs. That is bad for the test infrastructure, because it might allocate A LOT of memory (depending on the max heap), which is problematic for running tests locally. Also, our Kotlin tests stop on an OOM error altogether (so additional configuration would be required) and the heap is dumped into a 20GB file (on my machine), which is again problematic for local test runs. ^KT-61222
This commit is contained in:
committed by
Space Team
parent
040b7472a9
commit
5819f4eaa2
+5
@@ -25,6 +25,7 @@ import org.jetbrains.kotlin.analysis.low.level.api.fir.resolve.AbstractScriptLaz
|
||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.resolve.AbstractScriptWholeFileResolvePhaseTest
|
||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.resolve.AbstractSourceLazyDeclarationResolveScopeBasedTest
|
||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.resolve.AbstractSourceWholeFileResolvePhaseTest
|
||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.resolve.extensions.AbstractResolveExtensionDisposalAfterModificationEventTest
|
||||
import org.jetbrains.kotlin.generators.TestGroup
|
||||
import org.jetbrains.kotlin.generators.TestGroupSuite
|
||||
import org.jetbrains.kotlin.generators.util.TestGeneratorUtil
|
||||
@@ -281,6 +282,10 @@ internal fun TestGroupSuite.generateFirLowLevelApiTests() {
|
||||
testClass<AbstractContextCollectorScriptTest> {
|
||||
model("contextCollector", pattern = TestGeneratorUtil.KTS)
|
||||
}
|
||||
|
||||
testClass<AbstractResolveExtensionDisposalAfterModificationEventTest> {
|
||||
model("resolveExtensionDisposal")
|
||||
}
|
||||
}
|
||||
|
||||
testGroup("analysis/low-level-api-fir/tests", "analysis/analysis-api/testData") {
|
||||
|
||||
Reference in New Issue
Block a user