Skip to content

Commit 2558885

Browse files
committed
Disable flakey test.
See #4290
1 parent 55c81f4 commit 2558885

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/messaging/ChangeStreamTests.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
import static org.springframework.data.mongodb.core.query.Criteria.*;
2222
import static org.springframework.data.mongodb.core.query.Query.*;
2323

24-
import com.mongodb.client.model.ChangeStreamPreAndPostImagesOptions;
25-
import com.mongodb.client.model.CreateCollectionOptions;
26-
import com.mongodb.client.model.changestream.FullDocumentBeforeChange;
2724
import lombok.AllArgsConstructor;
2825
import lombok.Data;
2926
import lombok.NoArgsConstructor;
@@ -42,8 +39,10 @@
4239
import org.junit.jupiter.api.AfterEach;
4340
import org.junit.jupiter.api.BeforeAll;
4441
import org.junit.jupiter.api.BeforeEach;
42+
import org.junit.jupiter.api.Disabled;
4543
import org.junit.jupiter.api.Test;
4644
import org.junit.jupiter.api.extension.ExtendWith;
45+
import org.junitpioneer.jupiter.RepeatFailedTest;
4746
import org.springframework.data.annotation.Id;
4847
import org.springframework.data.mongodb.core.ChangeStreamOptions;
4948
import org.springframework.data.mongodb.core.CollectionOptions;
@@ -62,7 +61,7 @@
6261

6362
import com.mongodb.client.model.changestream.ChangeStreamDocument;
6463
import com.mongodb.client.model.changestream.FullDocument;
65-
import org.junitpioneer.jupiter.RepeatFailedTest;
64+
import com.mongodb.client.model.changestream.FullDocumentBeforeChange;
6665

6766
/**
6867
* Integration test for subscribing to a {@link com.mongodb.operation.ChangeStreamBatchCursor} inside the
@@ -702,7 +701,7 @@ void readsFullDocumentBeforeChangeWhenOptionDeclaredWhenAvailableAndChangeStream
702701
}
703702

704703
@Test // GH-4187
705-
@EnableIfMongoServerVersion(isLessThan = "6.0")
704+
@Disabled("Flakey test failing occasionally due to timing issues")
706705
void readsFullDocumentBeforeChangeWhenOptionDeclaredRequiredAndMongoVersionIsLessThan6() throws InterruptedException {
707706

708707
CollectingMessageListener<ChangeStreamDocument<Document>, User> messageListener = new CollectingMessageListener<>();

0 commit comments

Comments
 (0)