mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 05:09:37 +07:00
fix blinking EditorHistoryManagerTest.testSavingStateForNotOpenedEditors test
This commit is contained in:
@@ -479,6 +479,8 @@ public class EditorTestUtil {
|
||||
public static void waitForLoading(Editor editor) {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
if (editor == null) return;
|
||||
UIUtil.dispatchAllInvocationEvents(); // if editor is loaded synchronously,
|
||||
// background loading thread stays blocked in 'invokeAndWait' call
|
||||
while (!AsyncEditorLoader.isEditorLoaded(editor)) {
|
||||
LockSupport.parkNanos(100_000_000);
|
||||
UIUtil.dispatchAllInvocationEvents();
|
||||
|
||||
Reference in New Issue
Block a user