Replace calls to verifyComplete() to avoid indefinite blocking
See gh-35915
This commit is contained in:
committed by
Andy Wilkinson
parent
cee73cebd4
commit
f9da30faf1
@@ -83,8 +83,8 @@ class DataNeo4jTestReactiveIntegrationTests {
|
||||
.flatMap(this.exampleRepository::save)
|
||||
.as(StepVerifier::create)
|
||||
.expectNextCount(1)
|
||||
.verifyComplete();
|
||||
StepVerifier.create(this.neo4jTemplate.count(ExampleGraph.class)).expectNext(1L).verifyComplete();
|
||||
.expectComplete().verify(Duration.ofSeconds(5));
|
||||
StepVerifier.create(this.neo4jTemplate.count(ExampleGraph.class)).expectNext(1L).expectComplete().verify(Duration.ofSeconds(5));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -24,6 +24,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.r2dbc.core.DatabaseClient;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
@@ -46,7 +48,7 @@ class DataR2dbcTestIntegrationTests {
|
||||
|
||||
@Test
|
||||
void testDatabaseClient() {
|
||||
this.databaseClient.sql("SELECT * FROM example").fetch().all().as(StepVerifier::create).verifyComplete();
|
||||
this.databaseClient.sql("SELECT * FROM example").fetch().all().as(StepVerifier::create).expectComplete().verify(Duration.ofSeconds(5));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.boot.test.autoconfigure.data.redis;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -62,11 +63,11 @@ class DataRedisTestReactiveIntegrationTests {
|
||||
String id = UUID.randomUUID().toString();
|
||||
StepVerifier.create(this.operations.opsForValue().set(id, "Hello World"))
|
||||
.expectNext(Boolean.TRUE)
|
||||
.verifyComplete();
|
||||
StepVerifier.create(this.operations.opsForValue().get(id)).expectNext("Hello World").verifyComplete();
|
||||
.expectComplete().verify(Duration.ofSeconds(5));
|
||||
StepVerifier.create(this.operations.opsForValue().get(id)).expectNext("Hello World").expectComplete().verify(Duration.ofSeconds(5));
|
||||
StepVerifier.create(this.operations.execute((action) -> action.serverCommands().flushDb()))
|
||||
.expectNext("OK")
|
||||
.verifyComplete();
|
||||
.expectComplete().verify(Duration.ofSeconds(5));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user