mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
fixing flaky DebuggerSessionTest.testStateManager
avoid using UIUtil.invokeAndWaitIfNeeded as it logs InterruptedException inside GitOrigin-RevId: af137d0b685270838f198e88da5347af0a1eee0b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
32202ec9c8
commit
e91ae0c5c8
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.debugger;
|
||||
|
||||
import com.intellij.debugger.engine.*;
|
||||
@@ -32,6 +32,7 @@ import com.intellij.ui.classFilter.ClassFilter;
|
||||
import com.intellij.util.SmartList;
|
||||
import com.intellij.util.TimeoutUtil;
|
||||
import com.intellij.util.lang.CompoundRuntimeException;
|
||||
import com.intellij.util.ui.EdtInvocationManager;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.sun.jdi.Method;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -40,6 +41,7 @@ import org.jetbrains.java.debugger.breakpoints.properties.JavaLineBreakpointProp
|
||||
import org.jetbrains.java.debugger.breakpoints.properties.JavaMethodBreakpointProperties;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -305,7 +307,12 @@ public abstract class ExecutionWithDebuggerToolsTestCase extends ExecutionTestCa
|
||||
}
|
||||
else {
|
||||
if (!SwingUtilities.isEventDispatchThread()) {
|
||||
UIUtil.invokeAndWaitIfNeeded(() -> pumpSwingThread());
|
||||
try {
|
||||
EdtInvocationManager.getInstance().invokeAndWait(() -> pumpSwingThread());
|
||||
}
|
||||
catch (InvocationTargetException | InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SwingUtilities.invokeLater(() -> pumpSwingThread());
|
||||
|
||||
Reference in New Issue
Block a user