Skip to content

Commit 4724eae

Browse files
Give the server a little think time to complete operations during reactive tx tests.
1 parent c5f269a commit 4724eae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/ReactiveTransactionIntegrationTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void setUp() {
108108
Flux.merge( //
109109
MongoTestUtils.createOrReplaceCollection(DATABASE, operations.getCollectionName(Person.class), client),
110110
MongoTestUtils.createOrReplaceCollection(DATABASE, operations.getCollectionName(EventLog.class), client) //
111-
).then().as(StepVerifier::create).verifyComplete();
111+
).then().as(StepVerifier::create).thenAwait(Duration.ofMillis(100)).verifyComplete();
112112
}
113113
}
114114

@@ -143,6 +143,7 @@ public void commitShouldPersistTxEntries() {
143143

144144
personService.savePerson(new Person(null, "Walter", "White")) //
145145
.as(StepVerifier::create) //
146+
.thenAwait(Duration.ofMillis(100))
146147
.expectNextCount(1) //
147148
.verifyComplete();
148149

0 commit comments

Comments
 (0)