void () { DefaultLogger.disableStderrDumping(getTestRootDisposable()); final String failureMessage = "Expected Failure"; ProgressResult<?> result = computeAssertingExceptionConditionally( myOnEdt && myReleaseIWLockOnRun, () -> { return new ProgressRunner<>(() -> UIUtil.invokeAndWaitIfNeeded(() -> { throw new RuntimeException(failureMessage); })) .onThread(ProgressRunner.ThreadToUse.POOLED) .withProgress(createProgressWindow()) .modal() .sync() .submitAndGet(); }); if (result == null) { return; } assertFalse(result.isCanceled()); Throwable throwable = result.getThrowable(); assertNotNull(throwable); assertEquals(failureMessage, ExceptionUtil.getRootCause(throwable).getMessage()); }