-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSOT: Adjust timeouts and increase test coverage #1383
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
4ff2a0e
Re-enable tests.
vbabanin 250a85a
Add additional assertions.
vbabanin 6676260
Add ignoreExtraEvents override to avoid flakiness in racy tests.
vbabanin 1c079ca
Merge branch 'refs/heads/CSOT' into JAVA-5104
vbabanin ce83e58
Start using JUnit extension to disable failpoint instead of Tags.
vbabanin ee08fa0
Update tests.
vbabanin cd170a5
Remove FailPoint test extension.
vbabanin 0a7d145
Fix retry tests.
vbabanin d3841b5
Fix test assertion.
vbabanin cac9f36
- Fix timeoutContext being null for subsequent commmit transaction is…
vbabanin 306b7d8
- Skip cursor tests that require collection to be capped on serverles…
vbabanin 323ade2
Reduce timeouts for serverless tests to pass.
vbabanin 3ff91b7
Merge branch 'CSOT' into JAVA-5104
vbabanin c4ac3a3
- Revert change in unified tests.
vbabanin 5d10e95
Merge branch 'refs/heads/CSOT' into JAVA-5104
vbabanin 6c354ec
Merge branch 'CSOT' into JAVA-5104
vbabanin 9013da8
Remove unused imports.
vbabanin 9bbf840
Increase timeouts.
vbabanin 4472702
Merge branch 'CSOT' into JAVA-5104
vbabanin 6189cde
Merge branch 'refs/heads/CSOT' into JAVA-5104
vbabanin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,9 +41,7 @@ | |
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Tag; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.TestInfo; | ||
import reactor.core.publisher.Flux; | ||
import reactor.core.publisher.Hooks; | ||
import reactor.test.StepVerifier; | ||
|
@@ -107,7 +105,6 @@ protected boolean isAsync() { | |
return true; | ||
} | ||
|
||
@Tag("setsFailPoint") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
@DisplayName("6. GridFS Upload - uploads via openUploadStream can be timed out") | ||
@Test | ||
@Override | ||
|
@@ -117,7 +114,7 @@ public void testGridFSUploadViaOpenUploadStreamTimeout() { | |
|
||
//given | ||
collectionHelper.runAdminCommand("{" | ||
+ " configureFailPoint: \"failCommand\"," | ||
+ " configureFailPoint: \"" + FAIL_COMMAND_NAME + "\"," | ||
+ " mode: { times: 1 }," | ||
+ " data: {" | ||
+ " failCommands: [\"insert\"]," | ||
|
@@ -164,7 +161,6 @@ public void testGridFSUploadViaOpenUploadStreamTimeout() { | |
} | ||
} | ||
|
||
@Tag("setsFailPoint") | ||
@DisplayName("6. GridFS Upload - Aborting an upload stream can be timed out") | ||
@Test | ||
@Override | ||
|
@@ -177,7 +173,7 @@ public void testAbortingGridFsUploadStreamTimeout() throws ExecutionException, I | |
Hooks.onErrorDropped(droppedErrorFuture::complete); | ||
|
||
collectionHelper.runAdminCommand("{" | ||
+ " configureFailPoint: \"failCommand\"," | ||
+ " configureFailPoint: \"" + FAIL_COMMAND_NAME + "\"," | ||
+ " mode: { times: 1 }," | ||
+ " data: {" | ||
+ " failCommands: [\"delete\"]," | ||
|
@@ -227,7 +223,6 @@ public void testAbortingGridFsUploadStreamTimeout() throws ExecutionException, I | |
/** | ||
* Not a prose spec test. However, it is additional test case for better coverage. | ||
*/ | ||
@Tag("setsFailPoint") | ||
@DisplayName("TimeoutMS applies to full resume attempt in a next call") | ||
@Test | ||
public void testTimeoutMSAppliesToFullResumeAttemptInNextCall() { | ||
|
@@ -283,7 +278,6 @@ public void testTimeoutMSAppliesToFullResumeAttemptInNextCall() { | |
/** | ||
* Not a prose spec test. However, it is additional test case for better coverage. | ||
*/ | ||
@Tag("setsFailPoint") | ||
@DisplayName("TimeoutMS applied to initial aggregate") | ||
@Test | ||
public void testTimeoutMSAppliedToInitialAggregate() { | ||
|
@@ -332,7 +326,6 @@ public void testTimeoutMSAppliedToInitialAggregate() { | |
/** | ||
* Not a prose spec test. However, it is additional test case for better coverage. | ||
*/ | ||
@Tag("setsFailPoint") | ||
@DisplayName("TimeoutMS is refreshed for getMore if maxAwaitTimeMS is not set") | ||
@Test | ||
public void testTimeoutMsRefreshedForGetMoreWhenMaxAwaitTimeMsNotSet() { | ||
|
@@ -402,7 +395,6 @@ public void testTimeoutMsRefreshedForGetMoreWhenMaxAwaitTimeMsNotSet() { | |
/** | ||
* Not a prose spec test. However, it is additional test case for better coverage. | ||
*/ | ||
@Tag("setsFailPoint") | ||
@DisplayName("TimeoutMS is refreshed for getMore if maxAwaitTimeMS is set") | ||
@Test | ||
public void testTimeoutMsRefreshedForGetMoreWhenMaxAwaitTimeMsSet() { | ||
|
@@ -420,7 +412,8 @@ public void testTimeoutMsRefreshedForGetMoreWhenMaxAwaitTimeMsSet() { | |
.timeout(rtt + 300, TimeUnit.MILLISECONDS))) { | ||
|
||
MongoCollection<Document> collection = client.getDatabase(namespace.getDatabaseName()) | ||
.getCollection(namespace.getCollectionName()).withReadPreference(ReadPreference.primary()); | ||
.getCollection(namespace.getCollectionName()) | ||
.withReadPreference(ReadPreference.primary()); | ||
|
||
collectionHelper.runAdminCommand("{" | ||
+ " configureFailPoint: \"failCommand\"," | ||
|
@@ -449,6 +442,7 @@ public void testTimeoutMsRefreshedForGetMoreWhenMaxAwaitTimeMsSet() { | |
.expectNextCount(2) | ||
.thenAwait(Duration.ofMillis(600)) | ||
.thenRequest(2) | ||
.expectNextCount(2) | ||
.thenCancel() | ||
.verify(); | ||
|
||
|
@@ -463,7 +457,6 @@ public void testTimeoutMsRefreshedForGetMoreWhenMaxAwaitTimeMsSet() { | |
/** | ||
* Not a prose spec test. However, it is additional test case for better coverage. | ||
*/ | ||
@Tag("setsFailPoint") | ||
@DisplayName("TimeoutMS is honored for next operation when several getMore executed internally") | ||
@Test | ||
public void testTimeoutMsISHonoredForNnextOperationWhenSeveralGetMoreExecutedInternally() { | ||
|
@@ -528,8 +521,8 @@ public void setUp() { | |
|
||
@Override | ||
@AfterEach | ||
public void tearDown(final TestInfo info) { | ||
super.tearDown(info); | ||
public void tearDown() { | ||
super.tearDown(); | ||
SyncMongoClient.disableSleep(); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wowzers