|
15 | 15 | */
|
16 | 16 | package org.springframework.data.redis.stream;
|
17 | 17 |
|
18 |
| -import static org.assertj.core.api.Assertions.assertThat; |
19 |
| -import static org.assertj.core.api.Assertions.entry; |
20 |
| -import static org.mockito.ArgumentMatchers.any; |
21 |
| -import static org.mockito.Mockito.mock; |
22 |
| -import static org.mockito.Mockito.when; |
| 18 | +import static org.assertj.core.api.Assertions.*; |
| 19 | +import static org.mockito.ArgumentMatchers.*; |
| 20 | +import static org.mockito.Mockito.*; |
| 21 | + |
| 22 | +import reactor.core.publisher.Flux; |
| 23 | +import reactor.core.publisher.Mono; |
| 24 | +import reactor.test.StepVerifier; |
23 | 25 |
|
24 | 26 | import java.nio.ByteBuffer;
|
25 | 27 | import java.time.Duration;
|
|
51 | 53 | import org.springframework.data.redis.stream.StreamReceiver.StreamReceiverOptions;
|
52 | 54 | import org.springframework.data.redis.test.condition.EnabledOnCommand;
|
53 | 55 |
|
54 |
| -import reactor.core.publisher.Flux; |
55 |
| -import reactor.core.publisher.Mono; |
56 |
| -import reactor.test.StepVerifier; |
57 |
| - |
58 | 56 | /**
|
59 | 57 | * Integration tests for {@link StreamReceiver}.
|
60 | 58 | *
|
@@ -227,13 +225,13 @@ void shouldReceiveAsConsumerGroupMessages() {
|
227 | 225 | .consumeNextWith(it -> {
|
228 | 226 |
|
229 | 227 | assertThat(it.getStream()).isEqualTo("my-stream");
|
230 |
| - // assertThat(it.getValue()).containsEntry("key", "value"); |
231 |
| - assertThat(it.getValue()).containsValue("value"); |
| 228 | + |
| 229 | + assertThat(it.getValue().values()).containsAnyOf("value", "value2"); |
232 | 230 | }).consumeNextWith(it -> {
|
233 | 231 |
|
234 | 232 | assertThat(it.getStream()).isEqualTo("my-stream");
|
235 | 233 | // assertThat(it.getValue()).containsEntry("key2", "value2");
|
236 |
| - assertThat(it.getValue()).containsValue("value2"); |
| 234 | + assertThat(it.getValue().values()).containsAnyOf("value", "value2"); |
237 | 235 | }) //
|
238 | 236 | .thenCancel() //
|
239 | 237 | .verify(Duration.ofSeconds(5));
|
|
0 commit comments