Skip to content

Commit 5db7315

Browse files
committed
Add flaky annotation to flaky tests
1 parent 2143320 commit 5db7315

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

driver-sync/src/test/functional/com/mongodb/client/AbstractClientSideEncryptionDecryptionEventsTest.java

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import com.mongodb.event.CommandSucceededEvent;
3131
import com.mongodb.fixture.EncryptionFixture;
3232
import com.mongodb.internal.connection.TestCommandListener;
33+
import com.mongodb.test.FlakyTest;
3334
import org.bson.BsonBinary;
3435
import org.bson.BsonDocument;
3536
import org.bson.BsonString;
@@ -174,6 +175,7 @@ public void networkError() {
174175
assertDoesNotThrow(() -> commandListener.getCommandFailedEvent("aggregate"));
175176
}
176177

178+
@FlakyTest(maxAttempts = 3)
177179
@Test
178180
public void decryptError() {
179181
MongoCollection<Document> decryptionEvents = encryptedClient

driver-sync/src/test/functional/com/mongodb/client/AbstractClientSideOperationsTimeoutProseTest.java

+2
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ public void testBlockingIterationMethodsChangeStream() {
281281
}
282282
}
283283

284+
@FlakyTest(maxAttempts = 3)
284285
@DisplayName("6. GridFS Upload - uploads via openUploadStream can be timed out")
285286
@Test
286287
public void testGridFSUploadViaOpenUploadStreamTimeout() {
@@ -460,6 +461,7 @@ public void test8ServerSelectionHandshake(final String ignoredTestName, final in
460461
}
461462

462463
@SuppressWarnings("try")
464+
@FlakyTest(maxAttempts = 3)
463465
@DisplayName("9. End Session. The timeout specified via the MongoClient timeoutMS option")
464466
@Test
465467
public void test9EndSessionClientTimeout() {

0 commit comments

Comments
 (0)