Commit 90f99f75 authored by Vitaliy.Bibaev's avatar Vitaliy.Bibaev
Browse files

Do not allow hangs in the stream debugger tests

parent 14763fa2
Showing with 14 additions and 2 deletions
+14 -2
......@@ -29,7 +29,6 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Function;
......@@ -92,7 +91,7 @@ public abstract class TraceExecutionTestCase extends DebuggerTestCase {
}
private void doTestImpl(boolean isResultNull, @NotNull String className, @NotNull ChainSelector chainSelector)
throws InterruptedException, ExecutionException, InvocationTargetException {
throws ExecutionException {
createLocalProcess(className);
final XDebugSession session = getDebuggerSession().getXDebugSession();
assertNotNull(session);
......@@ -110,7 +109,20 @@ public abstract class TraceExecutionTestCase extends DebuggerTestCase {
resume();
return;
}
try {
sessionPausedImpl();
}
catch (Throwable t) {
println("Exception caught: " + t + ", " + t.getMessage(), ProcessOutputTypes.SYSTEM);
//noinspection CallToPrintStackTrace
t.printStackTrace();
resume();
}
}
private void sessionPausedImpl() {
printContext(getDebugProcess().getDebuggerContext());
final StreamChain chain = ApplicationManager.getApplication().runReadAction((Computable<StreamChain>)() -> {
final PsiElement elementAtBreakpoint = positionResolver.getNearestElementToBreakpoint(session);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment