mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[threading] IJPL-201090: Better handle registry in tests
GitOrigin-RevId: 2157a6532e67cf161b3a8a233ce82f2674d826f7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e4c0ddc79d
commit
786625aa4c
+3
-3
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user