Questions tagged [stepverifier]
5 questions
1
vote
1 answer
How to test using StepVerifier a Flux coming from a Controller using WebTestClient in Kotlin?
In Kotlin, I tried to test a simple @RestController using StepVerifier.
@GetMapping("/helloInt")
fun helloInt(): Flux {
return Flux.range(1, 3).delayElements(Duration.ofMillis(300))
}
The test is here:
@Test
fun…

moldovean
- 3,132
- 33
- 36
0
votes
0 answers
Reactor StepVerifier with expectNoEvent / then
I've implemented a queuer in Spring WebFlux as I asked about here: Queuing up requests in Spring WebFlux
TL;DR is that it queues up incoming requests to an external API, and then batches them after waiting for X requests or Y seconds.
After the…

orderlyfashion
- 531
- 1
- 4
- 14
0
votes
0 answers
WebFlux test another thread
How properly test webflux method with long operation
For example
Spring Webflux / Reactor release calling thread
@GetMapping("/foo")
public Mono bar() {
return Mono.fromCallable(() -> someService.veryLongSyncOperation())
…

LeshaRB
- 1,345
- 2
- 23
- 44
0
votes
0 answers
Reactive java test (StepVerifier)
I would like to write a test for the piece of code below. Specially I would like to verify the existence of the "response" object. Can I achieve this using…

Perugini
- 11
- 3
0
votes
1 answer
How to test a function returning single value like expected onNext actual onComplete.?
I am writing the test cases for one of the Spring Webflux function as:
public Mono getKey(Param param1) {
return getKeyFromBaseClass();
}
StepVerifier.create(class.getKey(param1)
.assertNext(key -> {
…

suchit
- 57
- 9