Skip to content
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 20 commits into from
Jun 12, 2024

Conversation

vbabanin
Copy link
Member

@vbabanin vbabanin commented May 6, 2024

Description

This PR introduces the following changes:

  • Timeout Adjustments: Some timeouts have been reduced to ensure tests pass in serverless configurations.
  • Additional Prose Tests: Added new prose tests to cover more scenarios.
  • Re-enabled ignored tests: Uncommented and re-enabled previously ignored tests.

JAVA-5104

@vbabanin vbabanin requested a review from rozza May 23, 2024 06:13
@vbabanin vbabanin marked this pull request as ready for review May 23, 2024 06:14
@vbabanin vbabanin changed the title Re-enable tests. CSOT: Re-enable tests. May 23, 2024
@vbabanin vbabanin changed the title CSOT: Re-enable tests. CSOT: Adjust timeouts and increase test coverage May 23, 2024
Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions

@@ -97,9 +100,6 @@
{
"name": "commitTransaction",
"object": "session",
"arguments": {
"timeoutMS": 500
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats the reasoning for this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reverted this change as we don't have overrides. Thank you for pointing it out!

* Not a prose spec test. However, it is additional test case for better coverage.
*/
@Test
@DisplayName("Should refresh timeout for commit transaction")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this test check that the timeout is refreshed? Seems to just confirm that the second commit fail with MongoOperationTimeoutException?

Copy link
Member Author

@vbabanin vbabanin May 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have corrected the DisplayName to be Should throw timeout exception for subsequent commit transaction. Good catch, thanks!

@@ -1,5 +1,6 @@
{
"description": "timeoutMS behaves correctly for non-tailable cursors",
"comment": "Manually reduced blockTimeMS for tests to pass in serverless",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wowzers

@@ -107,7 +105,6 @@ protected boolean isAsync() {
return true;
}

@Tag("setsFailPoint")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@vbabanin vbabanin requested a review from rozza May 27, 2024 04:59
# Conflicts:
#	driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedTest.java
@@ -742,10 +732,53 @@ public void shouldIgnoreWtimeoutMsOfWriteConcernToInitialAndSubsequentCommitTran
if (command.containsKey("writeConcern")) {
BsonDocument writeConcern = command.getDocument("writeConcern");
assertFalse(writeConcern.isEmpty());
assertFalse(writeConcern.containsKey("wTimeoutMS"));
assertFalse(writeConcern.containsKey("wtimeout"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

# Conflicts:
#	driver-sync/src/test/functional/com/mongodb/client/AbstractClientSideOperationsTimeoutProseTest.java
#	driver-sync/src/test/functional/com/mongodb/client/ClientSideOperationTimeoutTest.java
@vbabanin vbabanin merged commit 2218eb3 into mongodb:CSOT Jun 12, 2024
57 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants