[debugger] Add check into tests for preserving suspend policy on breakpoint

During implementation of IDEA-338723 suspend policy is switching from suspend-thread to suspend all. Without this switch, the suspend policy will be wrong. So now test can track possible regression.

GitOrigin-RevId: fbaeb0ec9552e93053b9474cbb8a550186c4651b
This commit is contained in:
Alexey Merkulov
2024-03-05 18:15:23 +01:00
committed by intellij-monorepo-bot
parent e5af21e4c7
commit 307ca80397
2 changed files with 10 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ public abstract class ExecutionWithDebuggerToolsTestCase extends ExecutionTestCa
protected static final int RATHER_LATER_INVOKES_N = 10;
public DebugProcessImpl myDebugProcess;
private final List<Throwable> myException = new SmartList<>();
protected boolean myWasUsedOnlyDefaultSuspendPolicy = true;
private static class InvokeRatherLaterRequest {
private final DebuggerCommandImpl myDebuggerCommand;
@@ -104,6 +105,7 @@ public abstract class ExecutionWithDebuggerToolsTestCase extends ExecutionTestCa
myDebugProcess = null;
myBreakpointProvider = null;
myRatherLaterRequests.clear();
myWasUsedOnlyDefaultSuspendPolicy = true;
}
catch (Throwable e) {
addSuppressedException(e);
@@ -462,6 +464,7 @@ public abstract class ExecutionWithDebuggerToolsTestCase extends ExecutionTestCa
//breakpoint.setSuspend(!DebuggerSettings.SUSPEND_NONE.equals(suspendPolicy));
breakpoint.setSuspendPolicy(suspendPolicy);
systemPrintln("SUSPEND_POLICY = " + suspendPolicy);
myWasUsedOnlyDefaultSuspendPolicy = false;
}
String condition = comment.readValue("Condition");