void () { ExecutorService executor = AppExecutorUtil.createBoundedApplicationPoolExecutor(StringUtil.capitalize(getName()), 10); for (int i = 0; i < 50; i++) { List<Disposable> disposables = IntStreamEx.range(100).mapToObj(__ -> Disposer.newDisposable()).toList(); List<Future<?>> futuresList = new ArrayList<>(); for (Disposable disposable : disposables) { futuresList.add(executor.submit(() -> { try { Boolean value = ReadAction.nonBlocking(() -> { return Boolean.TRUE; }).expireWith(disposable).executeSynchronously(); assertNotNull(value); } catch (ProcessCanceledException e) { //valid outcome } })); } disposables.forEach(Disposer::dispose); futuresList.forEach(f -> PlatformTestUtil.waitForFuture(f, 50_000)); } }