mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
IDEA-345642 Fix for flaky test in InlayPassTest
GitOrigin-RevId: e2be99a729a8490e7cc7dd49f90711b66e83da5b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
70afc86a27
commit
3b729e831e
@@ -10,6 +10,7 @@ import com.intellij.openapi.editor.Inlay
|
||||
import com.intellij.openapi.progress.DumbProgressIndicator
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
class InlayPassTest : BasePlatformTestCase() {
|
||||
private val noSettings = SettingsKey<NoSettings>("no")
|
||||
@@ -158,11 +159,10 @@ class InlayPassTest : BasePlatformTestCase() {
|
||||
}
|
||||
|
||||
private fun createOneOffCollector(collector: (InlayHintsSink) -> Unit): CollectorWithSettings<NoSettings> {
|
||||
var firstTime = true
|
||||
val firstTime = AtomicBoolean(true)
|
||||
val collectorLambda: (PsiElement, Editor, InlayHintsSink) -> Boolean = { _, _, sink ->
|
||||
if (firstTime) {
|
||||
if (firstTime.compareAndSet(true, false)) {
|
||||
collector(sink)
|
||||
firstTime = false
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user