[debugger] Check that there are no errors in the log for execution tests

Also mute the check for several tests

IJ-MR-122344

GitOrigin-RevId: e264e52b4d514c2da6fb08c0035f611629f4ebaf
This commit is contained in:
Alexey Merkulov
2024-02-28 16:57:41 +01:00
committed by intellij-monorepo-bot
parent 6feb1904f3
commit 3a021a5349
6 changed files with 33 additions and 1 deletions

View File

@@ -57,6 +57,10 @@ public abstract class ExecutionTestCase extends JavaProjectTestCase {
protected abstract String getTestAppPath();
protected boolean areLogErrorsIgnored() {
return false;
}
@Override
protected void setUp() throws Exception {
setupTempDir();
@@ -139,9 +143,14 @@ public abstract class ExecutionTestCase extends JavaProjectTestCase {
myChecker.print(s, outputType);
}
@SuppressWarnings("CallToPrintStackTrace")
@Override
protected void runBareRunnable(@NotNull ThrowableRunnable<Throwable> runnable) throws Throwable {
runnable.run();
int errorLoggingHappened = TestLoggerFactory.getRethrowErrorNumber();
if (errorLoggingHappened != 0 && !areLogErrorsIgnored()) {
assertEquals("No ignored errors should happen during execution tests", 0, errorLoggingHappened);
}
}
@Override