void (@NotNull ProgressIndicator indicator) { try { Future<?> future = ApplicationManager.getApplication().executeOnPooledThread( () -> ProgressManager.getInstance().runProcess( ProgressIndicatorTest::assertInvokeAndWaitWorks, ProgressWrapper.wrap(indicator))); future.get(2000, TimeUnit.MILLISECONDS); } catch (Throwable e) { throw new RuntimeException(e); // ProgressManager doesn't handle errors } }