作为主题,第 4 个变体Mono.subscribe
似乎没有调用成功消费者和完整消费者。它只调用订阅消费者。
下面的代码失败了
CountDownLatch latch = new CountDownLatch(3);
Mono.just(1).subscribe(i -> latch.countDown(), throwable -> {}, latch::countDown, s -> latch.countDown());
boolean success = latch.await(1, TimeUnit.SECONDS);
Assert.assertEquals(true, success);