From 79dbe82b1090df25e36159366d08a9b3538ddc3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 00:23:21 +0000 Subject: [PATCH 1/2] Bump testdata/specifications from `3aa0528` to `4a46628` Bumps [testdata/specifications](https://github.com/mongodb/specifications) from `3aa0528` to `4a46628`. - [Release notes](https://github.com/mongodb/specifications/releases) - [Commits](https://github.com/mongodb/specifications/compare/3aa052886e4b0d1048603898d01c112e20a6ffcf...4a46628a9efbc68d58134341b69be7ac1f5fada5) --- updated-dependencies: - dependency-name: testdata/specifications dependency-version: 4a46628a9efbc68d58134341b69be7ac1f5fada5 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- testdata/specifications | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testdata/specifications b/testdata/specifications index 3aa052886e..4a46628a9e 160000 --- a/testdata/specifications +++ b/testdata/specifications @@ -1 +1 @@ -Subproject commit 3aa052886e4b0d1048603898d01c112e20a6ffcf +Subproject commit 4a46628a9efbc68d58134341b69be7ac1f5fada5 From f0f37e8198fd8243c86fb9840748cc1cbbbd1476 Mon Sep 17 00:00:00 2001 From: Qingyang Hu Date: Thu, 25 Sep 2025 09:45:06 -0400 Subject: [PATCH 2/2] GODRIVER-3625 Remove driver tests for Atlas Data Lake --- .evergreen/config.yml | 32 ----- Taskfile.yml | 4 - internal/integration/client_test.go | 2 +- internal/integration/crud_prose_test.go | 4 +- internal/integration/csot_prose_test.go | 2 +- internal/integration/data_lake_test.go | 117 ------------------ internal/integration/mtest/mongotest.go | 5 - internal/integration/mtest/options.go | 8 -- .../unified/unified_spec_runner.go | 3 - .../integration/unified/unified_spec_test.go | 1 - internal/spectest/skip.go | 5 - 11 files changed, 4 insertions(+), 179 deletions(-) delete mode 100644 internal/integration/data_lake_test.go diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 11ba8e6627..f9192b013d 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -379,23 +379,6 @@ functions: binary: bash args: [*task-runner, evg-test-load-balancers] - run-atlas-data-lake-test: - - command: subprocess.exec - params: - binary: "bash" - env: - AUTH: auth - SSL: nossl - TOPOLOGY: server - MONGODB_URI: "mongodb://mhuser:pencil@localhost" - args: [*task-runner, setup-test] - - command: subprocess.exec - type: test - retry_on_failure: true - params: - binary: "bash" - args: [*task-runner, evg-test-atlas-data-lake] - run-docker-test: - command: subprocess.exec type: test @@ -1161,11 +1144,6 @@ tasks: OCSP_ALGORITHM: "ecdsa" OCSP_TLS_SHOULD_SUCCEED: "false" - - name: test-atlas-data-lake - commands: - - func: bootstrap-mongohoused - - func: run-atlas-data-lake-test - - name: test-docker-runner commands: - func: bootstrap-mongo-orchestration @@ -2171,16 +2149,6 @@ buildvariants: tasks: - name: "atlas-test" - - name: atlas-data-lake-test - tags: ["pullrequest"] - display_name: "Atlas Data Lake Test" - run_on: - - ubuntu2004-large - expansions: - GO_DIST: "/opt/golang/go1.23" - tasks: - - name: "test-atlas-data-lake" - - name: docker-runner-test tags: ["pullrequest"] display_name: "Docker Runner Test" diff --git a/Taskfile.yml b/Taskfile.yml index 411a09366c..5fd8210bda 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -130,10 +130,6 @@ tasks: evg-test: - go test -exec "env PKG_CONFIG_PATH=${PKG_CONFIG_PATH} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} DYLD_LIBRARY_PATH=$MACOS_LIBRARY_PATH}" ${BUILD_TAGS} -v -timeout {{.TEST_TIMEOUT}}s -p 1 ./... >> test.suite - evg-test-atlas-data-lake: - - ATLAS_DATA_LAKE_INTEGRATION_TEST=true go test -v ./internal/integration/unified -run TestUnifiedSpec/atlas-data-lake-testing >> spec_test.suite - - ATLAS_DATA_LAKE_INTEGRATION_TEST=true go test -v ./internal/integration -run TestAtlasDataLake >> spec_test.suite - evg-test-enterprise-auth: - go run -tags gssapi ./internal/cmd/testentauth/main.go diff --git a/internal/integration/client_test.go b/internal/integration/client_test.go index 8b37f12b47..d37e0fb514 100644 --- a/internal/integration/client_test.go +++ b/internal/integration/client_test.go @@ -724,7 +724,7 @@ func TestClient(t *testing.T) { func TestClient_BulkWrite(t *testing.T) { mt := mtest.New(t, noClientOpts) - mtBulkWriteOpts := mtest.NewOptions().MinServerVersion("8.0").AtlasDataLake(false).ClientType(mtest.Pinned) + mtBulkWriteOpts := mtest.NewOptions().MinServerVersion("8.0").ClientType(mtest.Pinned) mt.RunOpts("bulk write with nil filter", mtBulkWriteOpts, func(mt *mtest.T) { mt.Parallel() diff --git a/internal/integration/crud_prose_test.go b/internal/integration/crud_prose_test.go index fedf8f2b74..866b49d3d6 100644 --- a/internal/integration/crud_prose_test.go +++ b/internal/integration/crud_prose_test.go @@ -417,7 +417,7 @@ func TestErrorsCodeNamePropagated(t *testing.T) { } func TestClientBulkWriteProse(t *testing.T) { - mtOpts := mtest.NewOptions().MinServerVersion("8.0").AtlasDataLake(false).ClientType(mtest.Pinned) + mtOpts := mtest.NewOptions().MinServerVersion("8.0").ClientType(mtest.Pinned) mt := mtest.New(t, mtOpts) mt.Run("3. MongoClient.bulkWrite batch splits a writeModels input with greater than maxWriteBatchSize operations", func(mt *mtest.T) { @@ -660,7 +660,7 @@ func TestClientBulkWriteProse(t *testing.T) { }) mt.RunOpts("8. MongoClient.bulkWrite handles a cursor requiring getMore within a transaction", - mtest.NewOptions().MinServerVersion("8.0").AtlasDataLake(false).ClientType(mtest.Pinned). + mtest.NewOptions().MinServerVersion("8.0").ClientType(mtest.Pinned). Topologies(mtest.ReplicaSet, mtest.Sharded, mtest.LoadBalanced, mtest.ShardedReplicaSet), func(mt *mtest.T) { var getMoreCalled int diff --git a/internal/integration/csot_prose_test.go b/internal/integration/csot_prose_test.go index 52ea1d453c..6a3d83bb9c 100644 --- a/internal/integration/csot_prose_test.go +++ b/internal/integration/csot_prose_test.go @@ -179,7 +179,7 @@ func TestCSOTProse(t *testing.T) { }) mt.RunOpts("11. multi-batch bulkWrites", mtest.NewOptions().MinServerVersion("8.0"). - AtlasDataLake(false).Topologies(mtest.Single), func(mt *mtest.T) { + Topologies(mtest.Single), func(mt *mtest.T) { coll := mt.CreateCollection(mtest.Collection{DB: "db", Name: "coll"}, false) err := coll.Drop(context.Background()) require.NoError(mt, err, "Drop error: %v", err) diff --git a/internal/integration/data_lake_test.go b/internal/integration/data_lake_test.go deleted file mode 100644 index 23ef8da033..0000000000 --- a/internal/integration/data_lake_test.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package integration - -import ( - "context" - "fmt" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" - "go.mongodb.org/mongo-driver/v2/internal/mongoutil" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -func TestAtlasDataLake(t *testing.T) { - // Prose tests against Atlas Data Lake. - - mt := mtest.New(t, mtest.NewOptions().AtlasDataLake(true).CreateClient(false)) - getMtOpts := func() *mtest.Options { - return mtest.NewOptions().CollectionName("driverdata") - } - - mt.RunOpts("killCursors", getMtOpts(), func(mt *mtest.T) { - // Test that the killCursors sent internally when closing a cursor uses the correct namespace and cursor ID. - - // Run a Find and get the cursor ID and namespace returned by the server. Use a batchSize of 2 to force the - // server to keep the cursor open. - cursor, err := mt.Coll.Find(context.Background(), bson.D{}, options.Find().SetBatchSize(2)) - assert.Nil(mt, err, "Find error: %v", err) - findEvt := mt.GetSucceededEvent() - assert.Equal(mt, "find", findEvt.CommandName, "expected command name %q, got %q", "find", findEvt.CommandName) - expectedID := findEvt.Reply.Lookup("cursor", "id").Int64() - expectedNS := findEvt.Reply.Lookup("cursor", "ns").StringValue() - - // Close the cursor, forcing a killCursors command. - mt.ClearEvents() - err = cursor.Close(context.Background()) - assert.Nil(mt, err, "Close error: %v", err) - - // Extract information from the killCursors started event and assert that it sent the right cursor ID and ns. - killCursorsEvt := mt.GetStartedEvent() - assert.Equal(mt, "killCursors", killCursorsEvt.CommandName, "expected command name %q, got %q", "killCursors", - killCursorsEvt.CommandName) - actualID := killCursorsEvt.Command.Lookup("cursors", "0").Int64() - killCursorsDB := killCursorsEvt.Command.Lookup("$db").StringValue() - killCursorsColl := killCursorsEvt.Command.Lookup("killCursors").StringValue() - actualNS := fmt.Sprintf("%s.%s", killCursorsDB, killCursorsColl) - - assert.Equal(mt, expectedID, actualID, "expected cursor ID %v, got %v; find event %v, killCursors event %v", - expectedID, actualID, findEvt, killCursorsEvt) - assert.Equal(mt, expectedNS, actualNS, "expected namespace %q, got %q; find event %v, killCursors event %v", - expectedNS, actualNS, findEvt, killCursorsEvt) - - // Extract information from the killCursors succeeded event and assert that the right cursor was killed. - var killCursorsResponse struct { - CursorsKilled []int64 - } - err = bson.Unmarshal(mt.GetSucceededEvent().Reply, &killCursorsResponse) - assert.Nil(mt, err, "error unmarshalling killCursors response: %v", err) - expectedCursorsKilled := []int64{expectedID} - assert.Equal(mt, expectedCursorsKilled, killCursorsResponse.CursorsKilled, - "expected cursorsKilled array %v, got %v", expectedCursorsKilled, killCursorsResponse.CursorsKilled) - }) - - mt.RunOpts("auth settings", noClientOpts, func(mt *mtest.T) { - // Test connectivity using different auth settings. - - testCases := []struct { - name string - authMechanism string // No auth will be used if this is "". - }{ - {"no auth", ""}, - {"scram-sha-1", "SCRAM-SHA-1"}, - {"scram-sha-256", "SCRAM-SHA-256"}, - } - for _, tc := range testCases { - clientOpts := getBaseClientOptions(mt) - if tc.authMechanism != "" { - cred := getBaseCredential(mt) - cred.AuthMechanism = tc.authMechanism - clientOpts.SetAuth(cred) - } - mtOpts := getMtOpts().ClientOptions(clientOpts) - - mt.RunOpts(tc.name, mtOpts, func(mt *mtest.T) { - err := mt.Client.Ping(context.Background(), mtest.PrimaryRp) - assert.Nil(mt, err, "Ping error: %v", err) - }) - } - }) -} - -func getBaseClientOptions(mt *mtest.T) *options.ClientOptions { - mt.Helper() - - hosts, err := mongoutil.HostsFromURI(mtest.ClusterURI()) - require.NoError(mt, err) - - return options.Client().SetHosts(hosts) -} - -func getBaseCredential(mt *mtest.T) options.Credential { - mt.Helper() - - cred, err := mongoutil.AuthFromURI(mtest.ClusterURI()) - require.NoError(mt, err) - - assert.NotNil(mt, cred, "expected options for URI %q to have a non-nil Auth field", mtest.ClusterURI()) - return *cred -} diff --git a/internal/integration/mtest/mongotest.go b/internal/integration/mtest/mongotest.go index dd7d06b047..07c67a4ce0 100644 --- a/internal/integration/mtest/mongotest.go +++ b/internal/integration/mtest/mongotest.go @@ -74,7 +74,6 @@ type T struct { validTopologies []TopologyKind auth *bool enterprise *bool - dataLake *bool ssl *bool collCreateOpts *options.CreateCollectionOptionsBuilder requireAPIVersion *bool @@ -855,10 +854,6 @@ func (t *T) verifyConstraints() error { return fmt.Errorf("test requires enterprise value: %v, cluster enterprise value: %v", *t.enterprise, testContext.enterpriseServer) } - if t.dataLake != nil && *t.dataLake != testContext.dataLake { - return fmt.Errorf("test requires cluster to be data lake: %v, cluster is data lake: %v", *t.dataLake, - testContext.dataLake) - } if t.requireAPIVersion != nil && *t.requireAPIVersion != testContext.requireAPIVersion { return fmt.Errorf("test requires RequireAPIVersion value: %v, local RequireAPIVersion value: %v", *t.requireAPIVersion, testContext.requireAPIVersion) diff --git a/internal/integration/mtest/options.go b/internal/integration/mtest/options.go index 3ef86d1b30..565983a3d1 100644 --- a/internal/integration/mtest/options.go +++ b/internal/integration/mtest/options.go @@ -309,14 +309,6 @@ func (op *Options) Enterprise(ent bool) *Options { return op } -// AtlasDataLake specifies whether this test should only be run against Atlas Data Lake servers. Defaults to false. -func (op *Options) AtlasDataLake(adl bool) *Options { - op.optFuncs = append(op.optFuncs, func(t *T) { - t.dataLake = &adl - }) - return op -} - // RequireAPIVersion specifies whether this test should only be run when REQUIRE_API_VERSION is true. Defaults to false. func (op *Options) RequireAPIVersion(rav bool) *Options { op.optFuncs = append(op.optFuncs, func(t *T) { diff --git a/internal/integration/unified/unified_spec_runner.go b/internal/integration/unified/unified_spec_runner.go index b0f9e3c5e2..573ffea233 100644 --- a/internal/integration/unified/unified_spec_runner.go +++ b/internal/integration/unified/unified_spec_runner.go @@ -99,9 +99,6 @@ func runTestFile(t *testing.T, filepath string, expectValidFail bool, opts ...*O mtOpts := mtest.NewOptions(). RunOn(fileReqs...). CreateClient(false) - if strings.Contains(filepath, "atlas-data-lake-testing") { - mtOpts.AtlasDataLake(true) - } mt := mtest.New(t, mtOpts) for _, testCase := range testCases { diff --git a/internal/integration/unified/unified_spec_test.go b/internal/integration/unified/unified_spec_test.go index 9021d03e75..7ff374fd2e 100644 --- a/internal/integration/unified/unified_spec_test.go +++ b/internal/integration/unified/unified_spec_test.go @@ -36,7 +36,6 @@ var ( "server-discovery-and-monitoring/tests/unified", "run-command/tests/unified", "index-management/tests", - "atlas-data-lake-testing/tests/unified", } failDirectories = []string{ "unified-test-format/tests/valid-fail", diff --git a/internal/spectest/skip.go b/internal/spectest/skip.go index 73c2b2cd5f..905254ba4a 100644 --- a/internal/spectest/skip.go +++ b/internal/spectest/skip.go @@ -768,11 +768,6 @@ var skipTests = map[string][]string{ "TestUnifiedSpec/change-streams/tests/unified/change-streams.json/Test_array_truncation", }, - // TODO(DRIVERS-3153): Re-enable once resolved. - "Re-enable test following DRIVERS-3153 resolution (DRIVERS-3153)": { - "TestUnifiedSpec/atlas-data-lake-testing/tests/unified/getMore.json/A_successful_find_event_with_getMore", - }, - // TODO(GODRIVER-3137): Gossip cluster time from internal MongoClient to // session entities. "Must advance cluster times in unified spec runner (GODRIVER-3137)": {