void () { //RC: current implementation treat lambdas from the same class as 'same place' -- i.e. they are OK to use // with same .coalesceBy key. Hence the need to create the Inner class here -- to clearly show 'those 2 lambdas // are of different origins': DefaultLogger.disableStderrDumping(getTestRootDisposable()); Object same = new Object(); class Inner { void run() { ReadAction.nonBlocking(() -> {}).coalesceBy(same).submit(AppExecutorUtil.getAppExecutorService()); } } Promise<?> p = WriteAction.compute(() -> { Promise<?> p1 = ReadAction.nonBlocking(() -> {}).coalesceBy(same).submit(AppExecutorUtil.getAppExecutorService()); assertThrows(Throwable.class, "Same coalesceBy arguments", () -> new Inner().run()); return p1; }); waitForPromise(p); }