我试图弄清楚如何sequenceEqual
在Mono
. 我的代码如下:
Mono<Boolean> mono = Mono.sequenceEqual(Mono.just(1), Mono.just(1));
StepVerifier.create(mono)
.expectNext(true)
.expectComplete()
.verify();
这是我得到的堆栈跟踪
- java.lang.Throwable: Multiple exceptions
- java.lang.AssertionError: expectation "defaultOnSubscribe" failed (expected: onSubscribe(); actual: onNext(true))
- java.lang.AssertionError: expectation "expectNext(true)" failed (expected: onNext(true); actual: onComplete())
at reactor.test.DefaultStepVerifierBuilder$DefaultVerifySubscriber.validate(DefaultStepVerifierBuilder.java:1337)
at reactor.test.DefaultStepVerifierBuilder$DefaultVerifySubscriber.verify(DefaultStepVerifierBuilder.java:827)
at reactor.test.DefaultStepVerifierBuilder$DefaultStepVerifier.verify(DefaultStepVerifierBuilder.java:533)
at reactor.test.DefaultStepVerifierBuilder$DefaultStepVerifier.verify(DefaultStepVerifierBuilder.java:508)