Skip to content

Commit 6487f2c

Browse files
committed
Disable flakey tests.
See #3095
1 parent 8a6a536 commit 6487f2c

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/test/java/org/springframework/data/redis/cache/DefaultRedisCacheWriterTests.java

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import java.util.function.Consumer;
3434

3535
import org.junit.jupiter.api.BeforeEach;
36+
import org.junit.jupiter.api.Disabled;
3637

3738
import org.springframework.data.redis.connection.RedisConnection;
3839
import org.springframework.data.redis.connection.RedisConnectionFactory;
@@ -427,6 +428,7 @@ void noOpStatisticsCollectorReturnsEmptyStatsInstance() {
427428
}
428429

429430
@ParameterizedRedisTest // GH-1686
431+
@Disabled("Occasional failures on CI but not locally")
430432
void doLockShouldGetLock() throws InterruptedException {
431433

432434
int threadCount = 3;

src/test/java/org/springframework/data/redis/stream/StreamReceiverIntegrationTests.java

+10-12
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515
*/
1616
package org.springframework.data.redis.stream;
1717

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;
2325

2426
import java.nio.ByteBuffer;
2527
import java.time.Duration;
@@ -51,10 +53,6 @@
5153
import org.springframework.data.redis.stream.StreamReceiver.StreamReceiverOptions;
5254
import org.springframework.data.redis.test.condition.EnabledOnCommand;
5355

54-
import reactor.core.publisher.Flux;
55-
import reactor.core.publisher.Mono;
56-
import reactor.test.StepVerifier;
57-
5856
/**
5957
* Integration tests for {@link StreamReceiver}.
6058
*
@@ -227,13 +225,13 @@ void shouldReceiveAsConsumerGroupMessages() {
227225
.consumeNextWith(it -> {
228226

229227
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");
232230
}).consumeNextWith(it -> {
233231

234232
assertThat(it.getStream()).isEqualTo("my-stream");
235233
// assertThat(it.getValue()).containsEntry("key2", "value2");
236-
assertThat(it.getValue()).containsValue("value2");
234+
assertThat(it.getValue().values()).containsAnyOf("value", "value2");
237235
}) //
238236
.thenCancel() //
239237
.verify(Duration.ofSeconds(5));

0 commit comments

Comments
 (0)