From 786625aa4c3a41637adca7b8563ddaec24b2e062 Mon Sep 17 00:00:00 2001 From: Konstantin Nisht Date: Tue, 2 Sep 2025 17:27:44 +0200 Subject: [PATCH] [threading] IJPL-201090: Better handle registry in tests GitOrigin-RevId: 2157a6532e67cf161b3a8a233ce82f2674d826f7 --- .../com/intellij/psi/impl/DocumentCommitOnBackgroundTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/platform-tests/testSrc/com/intellij/psi/impl/DocumentCommitOnBackgroundTest.kt b/platform/platform-tests/testSrc/com/intellij/psi/impl/DocumentCommitOnBackgroundTest.kt index 0739eecb4f38..3955c8e246c7 100644 --- a/platform/platform-tests/testSrc/com/intellij/psi/impl/DocumentCommitOnBackgroundTest.kt +++ b/platform/platform-tests/testSrc/com/intellij/psi/impl/DocumentCommitOnBackgroundTest.kt @@ -7,12 +7,12 @@ import com.intellij.openapi.application.runReadAction import com.intellij.openapi.command.WriteCommandAction import com.intellij.openapi.editor.Document import com.intellij.openapi.project.DumbService +import com.intellij.openapi.util.registry.Registry import com.intellij.psi.PsiDocumentManager import com.intellij.psi.PsiFile import com.intellij.psi.PsiTreeChangeAdapter import com.intellij.psi.PsiTreeChangeEvent import com.intellij.testFramework.PlatformTestUtil -import com.intellij.testFramework.junit5.RegistryKey import com.intellij.testFramework.junit5.TestApplication import com.intellij.testFramework.junit5.TestDisposable import com.intellij.testFramework.junit5.fixture.moduleFixture @@ -91,8 +91,8 @@ class DocumentCommitOnBackgroundTest { } @Test - @RegistryKey("document.async.commit.with.coroutines", "true") fun `psiTreeChangeListener and psiTreeChangePreprocessor can be invoked on background`(@TestDisposable testDisposable: Disposable) { + Registry.get("document.async.commit.with.coroutines").setValue(true, testDisposable) val file = file.get() val psiDocumentManager = PsiDocumentManager.getInstance(project.get()) val psiManager = PsiManagerEx.getInstanceEx(project.get()) @@ -131,8 +131,8 @@ class DocumentCommitOnBackgroundTest { } @Test - @RegistryKey("document.async.commit.with.coroutines", "true") fun `psiDocumentTransactionTest can be invoked on background`(@TestDisposable testDisposable: Disposable) { + Registry.get("document.async.commit.with.coroutines").setValue(true, testDisposable) val file = file.get() val psiDocumentManager = PsiDocumentManager.getInstance(project.get()) val plainListener = RecordingDocumentTransactionListener()