【发布时间】:2018-01-28 09:57:42
【问题描述】:
我正在从该页面学习Reactive Programming:tutorial。我想知道为什么在下面的示例中,当我期望 4 条记录时,stact 跟踪会抛出实际一条记录的错误?
java.lang.AssertionError: expectation "expectNextCount(4)" failed (expected: count = 4; actual: counted = 1; signal: onComplete())
// TODO Create a StepVerifier that initially requests all values and expect 4 values to be received
StepVerifier requestAllExpectFour(Flux<User> flux) {
return StepVerifier.withVirtualTime(() -> Flux.just(flux))
.expectSubscription()
.thenRequest(4)
.expectNextCount(4)
.expectComplete();
}
我想知道我是否在这里遗漏了什么。
【问题讨论】:
标签: java project-reactor