[LL] Update Lincheck to version 2.24
- This new version fixes problems with concurrent hash maps in model checking tests and allows us to remove the correctness guarantee for them. ^KT-62136
This commit is contained in:
committed by
Space Team
parent
5207940f0b
commit
d4b0dfee0a
@@ -10,7 +10,7 @@ dependencies {
|
||||
testImplementation(project(":analysis:analysis-api"))
|
||||
testImplementation(project(":analysis:low-level-api-fir"))
|
||||
testImplementation(projectTests(":analysis:analysis-test-framework"))
|
||||
testImplementation("org.jetbrains.kotlinx:lincheck:2.23")
|
||||
testImplementation("org.jetbrains.kotlinx:lincheck:2.24")
|
||||
|
||||
testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil"))
|
||||
}
|
||||
|
||||
+1
-8
@@ -7,7 +7,6 @@ package org.jetbrains.kotlin.analysis.low.level.api.fir.caches
|
||||
|
||||
import org.jetbrains.kotlinx.lincheck.annotations.Operation
|
||||
import org.jetbrains.kotlinx.lincheck.check
|
||||
import org.jetbrains.kotlinx.lincheck.strategy.managed.forClasses
|
||||
import org.jetbrains.kotlinx.lincheck.strategy.managed.modelchecking.ModelCheckingOptions
|
||||
import org.jetbrains.kotlinx.lincheck.strategy.stress.StressOptions
|
||||
import org.junit.jupiter.api.Test
|
||||
@@ -44,14 +43,8 @@ class CleanableSoftValueCacheLincheckTest {
|
||||
@Operation
|
||||
fun remove(key: Int): Int? = cache.remove(key)
|
||||
|
||||
/**
|
||||
* The guarantee for [ConcurrentHashMap][java.util.concurrent.ConcurrentHashMap] is required for model checking to succeed because
|
||||
* `ConcurrentHashMap` doesn't pass Lincheck model checking itself.
|
||||
*/
|
||||
@Test
|
||||
fun modelCheckingTest() = ModelCheckingOptions()
|
||||
.addGuarantee(forClasses("java.util.concurrent.ConcurrentHashMap").allMethods().treatAsAtomic())
|
||||
.check(this::class)
|
||||
fun modelCheckingTest() = ModelCheckingOptions().check(this::class)
|
||||
|
||||
@Test
|
||||
fun stressTest() = StressOptions().check(this::class)
|
||||
|
||||
Reference in New Issue
Block a user