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

(Experimental) Add UnsafeAllowSeperateMaxTimeMSWithCSOT #1941

Draft
wants to merge 5 commits into
base: v1
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove commented out code
prestonvasquez committed Feb 14, 2025

Verified

This commit was signed with the committer’s verified signature.
prestonvasquez Preston Vasquez
commit 270a0f0fb43b71ca6f020758d9802e504c90e1fa
29 changes: 0 additions & 29 deletions mongo/integration/csot_test.go
Original file line number Diff line number Diff line change
@@ -741,35 +741,6 @@ func TestCSOT_maxTimeMS(t *testing.T) {

}

// mt.Run("FindOne uses MaxTime when UnsafeAllowSeperateMaxTimeMSWithCSOT is set", func(mt *mtest.T) {
// driver.UnsafeAllowSeperateMaxTimeMSWithCSOT = true

// // Enable CSOT
// mt.ResetClient(options.Client().SetTimeout(0))

// // Insert some documents so the collection isn't empty.
// insertTwoDocuments(mt)

// // Set a 5-second MaxTime value.
// opts := options.FindOne().SetMaxTime(5 * time.Second)

// ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
// defer cancel()

// res := mt.Coll.FindOne(ctx, bson.D{}, opts)
// require.NoError(mt, res.Err(), "Find error")

// // Assert that maxTimeMS is set and that it's equal to the MaxTime
// // value.
// maxTimeMS := getMaxTimeMS(mt, "find")
// assert.Equal(mt,
// int64(5_000),
// maxTimeMS,
// "expected maxTimeMS to be equal to the MaxTime value")
// })
//
// operation func(ctx context.Context, coll *mongo.Collection, maxTime *time.Duration) errorb

func TestCSOT_errors(t *testing.T) {
// Skip CSOT tests when SKIP_CSOT_TESTS=true. In Evergreen, we typically set
// that environment variable on Windows and macOS because the CSOT spec