IDEA-350300 Flaky test com.intellij.tests.BootstrapTests: com.intellij.openapi.editor.impl.EditorLoadTest.testEditorLoadedStateMustTransitionInOneDirection_Stress

GitOrigin-RevId: f67d711be6ef09c405e05d45632b020253da2c2b
This commit is contained in:
Alexey Kudravtsev
2024-04-02 16:12:42 +00:00
committed by intellij-monorepo-bot
parent b389067fb7
commit fffb2b1459
@@ -12,6 +12,7 @@ import com.intellij.openapi.fileEditor.OpenFileDescriptor;
import com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.testFramework.FileEditorManagerTestCase;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import java.nio.charset.StandardCharsets;
@@ -48,7 +49,9 @@ public class EditorLoadTest extends FileEditorManagerTestCase {
List<FileEditor> editors = manager.openEditor(new OpenFileDescriptor(getProject(), virtualFile, 0), false);
LOG.debug(i+": "+editors);
try {
assertTrue(loaded.get());
while (!loaded.get()) {
UIUtil.dispatchAllInvocationEvents();
}
run.set(false);
testStateInvariant.get().get();
}