diff --git a/evergreen/evergreen.yml b/evergreen/evergreen.yml
index bb42bd91d7a..7ef6c3f6f92 100644
--- a/evergreen/evergreen.yml
+++ b/evergreen/evergreen.yml
@@ -203,6 +203,7 @@ functions:
script: |
${PREPARE_SHELL}
REQUIRE_API_VERSION=${REQUIRE_API_VERSION} \
+ LOAD_BALANCER=${LOAD_BALANCER} \
MONGODB_VERSION=${VERSION} \
TOPOLOGY=${TOPOLOGY} \
AUTH=${AUTH} \
@@ -865,6 +866,8 @@ tasks:
- name: test-load-balancer-netstandard20
commands:
- func: bootstrap-mongo-orchestration
+ vars:
+ LOAD_BALANCER: 'true'
- func: run-load-balancer
- func: run-load-balancer-tests
vars:
@@ -874,6 +877,8 @@ tasks:
- name: test-load-balancer-netstandard21
commands:
- func: bootstrap-mongo-orchestration
+ vars:
+ LOAD_BALANCER: 'true'
- func: run-load-balancer
- func: run-load-balancer-tests
vars:
@@ -1588,14 +1593,14 @@ buildvariants:
- name: plain-auth-tests
- matrix_name: load-balancer-tests
- matrix_spec: { version: ["5.0", "latest"], auth: "noauth", ssl: "nossl", topology: "sharded-cluster", os: "ubuntu-1804" }
+ matrix_spec: { version: ["latest"], auth: "noauth", ssl: "nossl", topology: "sharded-cluster", os: "ubuntu-1804" }
display_name: "Load Balancer ${version} ${auth} ${ssl} ${os}"
tasks:
- name: "test-load-balancer-netstandard20"
- name: "test-load-balancer-netstandard21"
- matrix_name: load-balancer-tests-secure
- matrix_spec: { version: ["5.0", "latest"], auth: "auth", ssl: "ssl", topology: "sharded-cluster", os: "ubuntu-1804" }
+ matrix_spec: { version: ["latest"], auth: "auth", ssl: "ssl", topology: "sharded-cluster", os: "ubuntu-1804" }
display_name: "Load Balancer ${version} ${auth} ${ssl} ${os}"
tasks:
- name: "test-load-balancer-netstandard20"
diff --git a/src/MongoDB.Driver.Core/Core/Connections/HelloResult.cs b/src/MongoDB.Driver.Core/Core/Connections/HelloResult.cs
index ed8a67ff5bc..da9b5bffa0b 100644
--- a/src/MongoDB.Driver.Core/Core/Connections/HelloResult.cs
+++ b/src/MongoDB.Driver.Core/Core/Connections/HelloResult.cs
@@ -321,7 +321,7 @@ public ServerType ServerType
if (ServiceId != null)
{
- return ServerType.LoadBalanced; // TODO: change when Service Id will be supported by server
+ return ServerType.LoadBalanced;
}
return ServerType.Standalone;
@@ -344,15 +344,7 @@ public ObjectId? ServiceId
}
else
{
- if (ServiceIdHelper.IsServiceIdEmulationEnabled)
- {
- // TODO: temporary solution until server will actually support serviceId
- return TopologyVersion?.ProcessId;
- }
- else
- {
- return null;
- }
+ return null;
}
}
}
diff --git a/src/MongoDB.Driver.Core/ServiceIdHelper.cs b/src/MongoDB.Driver.Core/ServiceIdHelper.cs
deleted file mode 100644
index acfff2f1a78..00000000000
--- a/src/MongoDB.Driver.Core/ServiceIdHelper.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright 2021-present MongoDB Inc.
-*
-* 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
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-namespace MongoDB.Driver.Core
-{
- internal static class ServiceIdHelper
- {
- ///
- /// Temporary workaround until server will actually support serviceId.
- ///
- public static bool IsServiceIdEmulationEnabled { get; set; } = false;
- }
-}
diff --git a/tests/MongoDB.Driver.Core.TestHelpers/CoreTestConfiguration.cs b/tests/MongoDB.Driver.Core.TestHelpers/CoreTestConfiguration.cs
index 143256f62f3..8d143b70242 100644
--- a/tests/MongoDB.Driver.Core.TestHelpers/CoreTestConfiguration.cs
+++ b/tests/MongoDB.Driver.Core.TestHelpers/CoreTestConfiguration.cs
@@ -253,25 +253,13 @@ public static ConnectionString CreateConnectionString()
}
}
- var connectionString = new ConnectionString(uri);
- if (connectionString.LoadBalanced)
- {
- // TODO: temporary solution until server will actually support serviceId
- ServiceIdHelper.IsServiceIdEmulationEnabled = true;
- }
- return connectionString;
+ return new ConnectionString(uri);
}
private static ConnectionString GetConnectionStringWithMultipleShardRouters()
{
var uri = Environment.GetEnvironmentVariable("MONGODB_URI_WITH_MULTIPLE_MONGOSES") ?? "mongodb://localhost,localhost:27018";
- var connectionString = new ConnectionString(uri);
- if (connectionString.LoadBalanced)
- {
- // TODO: temporary solution until server will actually support serviceId
- ServiceIdHelper.IsServiceIdEmulationEnabled = true;
- }
- return connectionString;
+ return new ConnectionString(uri);
}
private static DatabaseNamespace GetDatabaseNamespace()
@@ -451,37 +439,39 @@ private static string GetStorageEngine()
string result;
var clusterType = __cluster.Value.Description.Type;
- if (clusterType == ClusterType.Sharded || clusterType == ClusterType.LoadBalanced)
- {
- // mongos cannot provide this data directly, so we need connection to a particular mongos shard
- var shardsCollection = new CollectionNamespace("config", "shards");
- var shards = FindDocuments(__cluster.Value, shardsCollection).FirstOrDefault();
- if (shards != null)
- {
- var fullHosts = shards["host"].AsString; // for example: "shard01/localhost:27018,localhost:27019,localhost:27020"
- var firstHost = fullHosts.Substring(fullHosts.IndexOf('/') + 1).Split(',')[0];
- using (var cluster = CreateCluster(
- configurator => configurator.ConfigureCluster(cs => cs.With(endPoints: new[] { EndPointHelper.Parse(firstHost) })),
- allowDataBearingServers: true))
- {
- result = GetStorageEngineForCluster(cluster);
- }
- }
- else
- {
- if (Serverless)
+ switch (clusterType)
+ {
+ case ClusterType.LoadBalanced:
+ case var _ when Serverless:
+ // Load balancing and serverless are only supported for servers higher than 50
+ result = "wiredTiger";
+ break;
+ case ClusterType.Sharded:
{
- result = "wiredTiger";
- }
- else
- {
- throw new InvalidOperationException("mongos has not been found.");
+ // mongos cannot provide this data directly, so we need connection to a particular mongos shard
+ var shardsCollection = new CollectionNamespace("config", "shards");
+ var shards = FindDocuments(__cluster.Value, shardsCollection).FirstOrDefault();
+ if (shards != null)
+ {
+ var fullHosts = shards["host"].AsString; // for example: "shard01/localhost:27018,localhost:27019,localhost:27020"
+ var firstHost = fullHosts.Substring(fullHosts.IndexOf('/') + 1).Split(',')[0];
+ using (var cluster = CreateCluster(
+ configurator => configurator.ConfigureCluster(cs => cs.With(endPoints: new[] { EndPointHelper.Parse(firstHost) })),
+ allowDataBearingServers: true))
+ {
+ result = GetStorageEngineForCluster(cluster);
+ }
+ }
+ else
+ {
+ throw new InvalidOperationException("mongos has not been found.");
+ }
+ break;
}
- }
- }
- else
- {
- result = GetStorageEngineForCluster(__cluster.Value);
+
+ default:
+ result = GetStorageEngineForCluster(__cluster.Value);
+ break;
}
return result ?? "mmapv1";
diff --git a/tests/MongoDB.Driver.Core.Tests/LoadBalancingIntergationTests.cs b/tests/MongoDB.Driver.Core.Tests/LoadBalancingIntergationTests.cs
index b84b5d89e6a..79fd6560372 100644
--- a/tests/MongoDB.Driver.Core.Tests/LoadBalancingIntergationTests.cs
+++ b/tests/MongoDB.Driver.Core.Tests/LoadBalancingIntergationTests.cs
@@ -55,8 +55,6 @@ public void BulkWrite_should_pin_connection_as_expected(
SetupData();
- ServiceIdHelper.IsServiceIdEmulationEnabled = true; // TODO: temporary solution to enable emulating serviceId in a server response
-
var eventCapturer = new EventCapturer()
.Capture()
.Capture()
@@ -104,8 +102,6 @@ public void BulkWrite_and_cursor_should_share_pinned_connection_under_the_same_t
SetupData();
- ServiceIdHelper.IsServiceIdEmulationEnabled = true; // TODO: temporary solution to enable emulating serviceId in a server response
-
var eventCapturer = new EventCapturer()
.Capture()
.Capture()
@@ -179,8 +175,6 @@ public void BulkWrite_and_cursor_should_share_pinned_connection_under_the_same_t
SetupData();
- ServiceIdHelper.IsServiceIdEmulationEnabled = true; // TODO: temporary solution to enable emulating serviceId in a server response
-
var eventCapturer = new EventCapturer()
.Capture()
.Capture()
@@ -249,8 +243,6 @@ public void Cursor_should_pin_connection_as_expected(
SetupData();
- ServiceIdHelper.IsServiceIdEmulationEnabled = true; // TODO: temporary solution to enable emulating serviceId in a server response
-
var eventCapturer = new EventCapturer()
.Capture()
.Capture()
@@ -321,8 +313,6 @@ public void Cursor_should_pin_connection_in_transaction_with_new_sessions_as_exp
SetupData();
- ServiceIdHelper.IsServiceIdEmulationEnabled = true; // TODO: temporary solution to enable emulating serviceId in a server response
-
var eventCapturer = new EventCapturer()
.Capture()
.Capture()
@@ -397,8 +387,6 @@ public void Cursor_should_pin_connection_in_transaction_with_the_same_session_as
SetupData();
- ServiceIdHelper.IsServiceIdEmulationEnabled = true; // TODO: temporary solution to enable emulating serviceId in a server response
-
var eventCapturer = new EventCapturer()
.Capture()
.Capture()
@@ -476,8 +464,6 @@ public void Cursor_should_unpin_connection_for_operations_under_the_same_transac
SetupData();
- ServiceIdHelper.IsServiceIdEmulationEnabled = true; // TODO: temporary solution to enable emulating serviceId in a server response
-
var eventCapturer = new EventCapturer()
.Capture()
.Capture()
diff --git a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/README.rst b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/README.rst
index 6072deb7381..0c332b67a19 100644
--- a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/README.rst
+++ b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/README.rst
@@ -8,9 +8,23 @@ to prove their conformance to the Initial DNS Seedlist Discovery spec.
Test Setup
----------
-Start a three-node replica set on localhost, on ports 27017, 27018, and 27019,
-with replica set name "repl0". The replica set MUST be started with SSL
-enabled.
+The tests in the ``replica-set`` directory MUST be executed against a
+three-node replica set on localhost ports 27017, 27018, and 27019 with
+replica set name ``repl0``.
+
+The tests in the ``load-balanced`` directory MUST be executed against a
+load-balanced sharded cluster with the mongos servers running on localhost ports
+27017 and 27018 and ``--loadBalancerPort`` 27050 and 27051, respectively
+(corresponding to the script in `drivers-evergreen-tools`_). The load balancers,
+shard servers, and config servers may run on any open ports.
+
+.. _`drivers-evergreen-tools`: https://github.com/mongodb-labs/drivers-evergreen-tools/blob/master/.evergreen/run-load-balancer.sh
+
+The tests in the ``sharded`` directory MUST be executed against a sharded
+cluster with the mongos servers running on localhost ports 27017 and 27018.
+Shard servers and config servers may run on any open ports.
+
+In all cases, the clusters MUST be started with SSL enabled.
To run the tests that accompany this spec, you need to configure the SRV and
TXT records with a real name server. The following records are required for
@@ -20,27 +34,32 @@ these tests::
localhost.test.build.10gen.cc. 86400 IN A 127.0.0.1
localhost.sub.test.build.10gen.cc. 86400 IN A 127.0.0.1
- Record TTL Class Port Target
- _mongodb._tcp.test1.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
- _mongodb._tcp.test1.test.build.10gen.cc. 86400 IN SRV 27018 localhost.test.build.10gen.cc.
- _mongodb._tcp.test2.test.build.10gen.cc. 86400 IN SRV 27018 localhost.test.build.10gen.cc.
- _mongodb._tcp.test2.test.build.10gen.cc. 86400 IN SRV 27019 localhost.test.build.10gen.cc.
- _mongodb._tcp.test3.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
- _mongodb._tcp.test5.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
- _mongodb._tcp.test6.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
- _mongodb._tcp.test7.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
- _mongodb._tcp.test8.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
- _mongodb._tcp.test10.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
- _mongodb._tcp.test11.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
- _mongodb._tcp.test12.test.build.10gen.cc. 86400 IN SRV 27017 localhost.build.10gen.cc.
- _mongodb._tcp.test13.test.build.10gen.cc. 86400 IN SRV 27017 test.build.10gen.cc.
- _mongodb._tcp.test14.test.build.10gen.cc. 86400 IN SRV 27017 localhost.not-test.build.10gen.cc.
- _mongodb._tcp.test15.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.not-build.10gen.cc.
- _mongodb._tcp.test16.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.not-10gen.cc.
- _mongodb._tcp.test17.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.not-cc.
- _mongodb._tcp.test18.test.build.10gen.cc. 86400 IN SRV 27017 localhost.sub.test.build.10gen.cc.
- _mongodb._tcp.test19.test.build.10gen.cc. 86400 IN SRV 27017 localhost.evil.build.10gen.cc.
- _mongodb._tcp.test19.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
+ Record TTL Class Port Target
+ _mongodb._tcp.test1.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test1.test.build.10gen.cc. 86400 IN SRV 27018 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test2.test.build.10gen.cc. 86400 IN SRV 27018 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test2.test.build.10gen.cc. 86400 IN SRV 27019 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test3.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test5.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test6.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test7.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test8.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test10.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test11.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test12.test.build.10gen.cc. 86400 IN SRV 27017 localhost.build.10gen.cc.
+ _mongodb._tcp.test13.test.build.10gen.cc. 86400 IN SRV 27017 test.build.10gen.cc.
+ _mongodb._tcp.test14.test.build.10gen.cc. 86400 IN SRV 27017 localhost.not-test.build.10gen.cc.
+ _mongodb._tcp.test15.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.not-build.10gen.cc.
+ _mongodb._tcp.test16.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.not-10gen.cc.
+ _mongodb._tcp.test17.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.not-cc.
+ _mongodb._tcp.test18.test.build.10gen.cc. 86400 IN SRV 27017 localhost.sub.test.build.10gen.cc.
+ _mongodb._tcp.test19.test.build.10gen.cc. 86400 IN SRV 27017 localhost.evil.build.10gen.cc.
+ _mongodb._tcp.test19.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test20.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test21.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc.
+ _customname._tcp.test22.test.build.10gen.cc 86400 IN SRV 27017 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test23.test.build.10gen.cc. 86400 IN SRV 8000 localhost.test.build.10gen.cc.
+ _mongodb._tcp.test24.test.build.10gen.cc. 86400 IN SRV 8000 localhost.test.build.10gen.cc.
Record TTL Class Text
test5.test.build.10gen.cc. 86400 IN TXT "replicaSet=repl0&authSource=thisDB"
@@ -50,11 +69,20 @@ these tests::
test8.test.build.10gen.cc. 86400 IN TXT "authSource"
test10.test.build.10gen.cc. 86400 IN TXT "socketTimeoutMS=500"
test11.test.build.10gen.cc. 86400 IN TXT "replicaS" "et=rep" "l0"
+ test20.test.build.10gen.cc. 86400 IN TXT "loadBalanced=true"
+ test21.test.build.10gen.cc. 86400 IN TXT "loadBalanced=false"
+ test24.test.build.10gen.cc. 86400 IN TXT "loadBalanced=true"
+
+Notes:
-Note that ``test4`` is omitted deliberately to test what happens with no SRV
-record. ``test9`` is missing because it was deleted during the development of
-the tests. The missing ``test.`` sub-domain in the SRV record target for
-``test12`` is deliberate.
+- ``test4`` is omitted deliberately to test what happens with no SRV record.
+- ``test9`` is missing because it was deleted during the development of the
+ tests.
+- The missing ``test.`` sub-domain in the SRV record target for ``test12`` is
+ deliberate.
+- ``test22`` is used to test a custom service name (``customname``).
+- ``test23`` and ``test24`` point to port 8000 (HAProxy) and are used for
+ load-balanced tests.
In our tests we have used ``localhost.test.build.10gen.cc`` as the domain, and
then configured ``localhost.test.build.10gen.cc`` to resolve to 127.0.0.1.
@@ -68,28 +96,49 @@ Test Format and Use
These YAML and JSON files contain the following fields:
-- ``uri``: a mongodb+srv connection string
+- ``uri``: a ``mongodb+srv`` connection string
- ``seeds``: the expected set of initial seeds discovered from the SRV record
+- ``numSeeds``: the expected number of initial seeds discovered from the SRV
+ record. This is mainly used to test ``srvMaxHosts``, since randomly selected
+ hosts cannot be deterministically asserted.
- ``hosts``: the discovered topology's list of hosts once SDAM completes a scan
-- ``options``: the parsed connection string options as discovered from URI and
- TXT records
-- ``parsed_options``: additional options present in the `Connection String`_
- URI such as ``Userinfo`` (as ``user`` and ``password``), and ``Auth
- database`` (as ``auth_database``).
+- ``numHosts``: the expected number of hosts discovered once SDAM completes a
+ scan. This is mainly used to test ``srvMaxHosts``, since randomly selected
+ hosts cannot be deterministically asserted.
+- ``options``: the parsed `URI options`_ as discovered from the
+ `Connection String`_'s "Connection Options" component and SRV resolution
+ (e.g. TXT records, implicit ``tls`` default).
+- ``parsed_options``: additional, parsed options from other `Connection String`_
+ components. This is mainly used for asserting ``UserInfo`` (as ``user`` and
+ ``password``) and ``Auth database`` (as ``auth_database``).
- ``error``: indicates that the parsing of the URI, or the resolving or
contents of the SRV or TXT records included errors.
- ``comment``: a comment to indicate why a test would fail.
.. _`Connection String`: ../../connection-string/connection-string-spec.rst
+.. _`URI options`: ../../uri-options/uri-options.rst
+
+For each file, create a MongoClient initialized with the ``mongodb+srv``
+connection string.
+
+If ``seeds`` is specified, drivers SHOULD verify that the set of hosts in the
+client's initial seedlist matches the list in ``seeds``. If ``numSeeds`` is
+specified, drivers SHOULD verify that the size of that set matches ``numSeeds``.
+
+If ``hosts`` is specified, drivers MUST verify that the set of
+ServerDescriptions in the client's TopologyDescription eventually matches the
+list in ``hosts``. If ``numHosts`` is specified, drivers MUST verify that the
+size of that set matches ``numHosts``.
+
+If ``options`` is specified, drivers MUST verify each of the values under
+``options`` match the MongoClient's parsed value for that option. There may be
+other options parsed by the MongoClient as well, which a test does not verify.
+
+If ``parsed_options`` is specified, drivers MUST verify that each of the values
+under ``parsed_options`` match the MongoClient's parsed value for that option.
+Supported values include, but are not limited to, ``user`` and ``password``
+(parsed from ``UserInfo``) and ``auth_database`` (parsed from
+``Auth database``).
-For each file, create MongoClient initialized with the mongodb+srv connection
-string. You SHOULD verify that the client's initial seed list matches the list of
-seeds. You MUST verify that the set of ServerDescriptions in the client's
-TopologyDescription eventually matches the list of hosts. You MUST verify that
-each of the values of the Connection String Options under ``options`` match the
-Client's parsed value for that option. There may be other options parsed by
-the Client as well, which a test does not verify. In ``uri-with-auth`` the URI
-contains a user/password set and additional options are provided in
-``parsed_options`` so that tests can verify authentication is maintained when
-evaluating URIs. You MUST verify that an error has been thrown if ``error`` is
-present.
+If ``error`` is specified and ``true``, drivers MUST verify that an error has
+been thrown.
diff --git a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-directConnection.json b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-directConnection.json
index 7f41932bb2f..3f500acdc6a 100644
--- a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-directConnection.json
+++ b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-directConnection.json
@@ -1,10 +1,10 @@
{
- "uri": "mongodb+srv://test20.test.build.10gen.cc/?directConnection=false",
+ "uri": "mongodb+srv://test24.test.build.10gen.cc/?directConnection=false",
"seeds": [
- "localhost.test.build.10gen.cc:27017"
+ "localhost.test.build.10gen.cc:8000"
],
"hosts": [
- "localhost.test.build.10gen.cc:27017"
+ "localhost.test.build.10gen.cc:8000"
],
"options": {
"loadBalanced": true,
diff --git a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-directConnection.yml b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-directConnection.yml
index 0c96f352c28..c8395f77861 100644
--- a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-directConnection.yml
+++ b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-directConnection.yml
@@ -1,12 +1,12 @@
-# The TXT record for test20.test.build.10gen.cc contains loadBalanced=true.
+# The TXT record for test24.test.build.10gen.cc contains loadBalanced=true.
# DRIVERS-1721 introduced this test as passing.
-uri: "mongodb+srv://test20.test.build.10gen.cc/?directConnection=false"
+uri: "mongodb+srv://test24.test.build.10gen.cc/?directConnection=false"
seeds:
- - localhost.test.build.10gen.cc:27017
+ - localhost.test.build.10gen.cc:8000
hosts:
# In LB mode, the driver does not do server discovery, so the hostname does
- # not get resolved to localhost:27017.
- - localhost.test.build.10gen.cc:27017
+ # not get resolved to localhost:8000.
+ - localhost.test.build.10gen.cc:8000
options:
loadBalanced: true
ssl: true
diff --git a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-replicaSet-errors.json b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-replicaSet-errors.json
index 9ed5ff22c22..2133dee5329 100644
--- a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-replicaSet-errors.json
+++ b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-replicaSet-errors.json
@@ -1,5 +1,5 @@
{
- "uri": "mongodb+srv://test20.test.build.10gen.cc/?replicaSet=replset",
+ "uri": "mongodb+srv://test24.test.build.10gen.cc/?replicaSet=replset",
"seeds": [],
"hosts": [],
"error": true,
diff --git a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-replicaSet-errors.yml b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-replicaSet-errors.yml
index 208c6a97390..896f7de7b55 100644
--- a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-replicaSet-errors.yml
+++ b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-replicaSet-errors.yml
@@ -1,5 +1,5 @@
-# The TXT record for test20.test.build.10gen.cc contains loadBalanced=true.
-uri: "mongodb+srv://test20.test.build.10gen.cc/?replicaSet=replset"
+# The TXT record for test24.test.build.10gen.cc contains loadBalanced=true.
+uri: "mongodb+srv://test24.test.build.10gen.cc/?replicaSet=replset"
seeds: []
hosts: []
error: true
diff --git a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-true-txt.json b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-true-txt.json
index 0117b3e9cba..f9719e760d1 100644
--- a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-true-txt.json
+++ b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-true-txt.json
@@ -1,10 +1,10 @@
{
- "uri": "mongodb+srv://test20.test.build.10gen.cc/",
+ "uri": "mongodb+srv://test24.test.build.10gen.cc/",
"seeds": [
- "localhost.test.build.10gen.cc:27017"
+ "localhost.test.build.10gen.cc:8000"
],
"hosts": [
- "localhost.test.build.10gen.cc:27017"
+ "localhost.test.build.10gen.cc:8000"
],
"options": {
"loadBalanced": true,
diff --git a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-true-txt.yml b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-true-txt.yml
index bbf9e8c5996..a172bda52b8 100644
--- a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-true-txt.yml
+++ b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-true-txt.yml
@@ -1,10 +1,10 @@
-uri: "mongodb+srv://test20.test.build.10gen.cc/"
+uri: "mongodb+srv://test24.test.build.10gen.cc/"
seeds:
- - localhost.test.build.10gen.cc:27017
+ - localhost.test.build.10gen.cc:8000
hosts:
# In LB mode, the driver does not do server discovery, so the hostname does
- # not get resolved to localhost:27017.
- - localhost.test.build.10gen.cc:27017
+ # not get resolved to localhost:8000.
+ - localhost.test.build.10gen.cc:8000
options:
loadBalanced: true
ssl: true
diff --git a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.json b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.json
index a7600a8a7b1..593a521c261 100644
--- a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.json
+++ b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.json
@@ -1,5 +1,5 @@
{
- "uri": "mongodb+srv://test20.test.build.10gen.cc/?srvMaxHosts=1",
+ "uri": "mongodb+srv://test24.test.build.10gen.cc/?srvMaxHosts=1",
"seeds": [],
"hosts": [],
"error": true,
diff --git a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.yml b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.yml
index bf0636039c6..01379cd2053 100644
--- a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.yml
+++ b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.yml
@@ -1,4 +1,4 @@
-uri: "mongodb+srv://test20.test.build.10gen.cc/?srvMaxHosts=1"
+uri: "mongodb+srv://test24.test.build.10gen.cc/?srvMaxHosts=1"
seeds: []
hosts: []
error: true
diff --git a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero-txt.json b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero-txt.json
index 8d48b5bbb93..a18360ea64e 100644
--- a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero-txt.json
+++ b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero-txt.json
@@ -1,10 +1,10 @@
{
- "uri": "mongodb+srv://test20.test.build.10gen.cc/?srvMaxHosts=0",
+ "uri": "mongodb+srv://test24.test.build.10gen.cc/?srvMaxHosts=0",
"seeds": [
- "localhost.test.build.10gen.cc:27017"
+ "localhost.test.build.10gen.cc:8000"
],
"hosts": [
- "localhost.test.build.10gen.cc:27017"
+ "localhost.test.build.10gen.cc:8000"
],
"options": {
"loadBalanced": true,
diff --git a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero-txt.yml b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero-txt.yml
index 3ec00b574da..986164e3b91 100644
--- a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero-txt.yml
+++ b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero-txt.yml
@@ -1,9 +1,9 @@
# loadBalanced=true (TXT) is permitted because srvMaxHosts is non-positive
-uri: "mongodb+srv://test20.test.build.10gen.cc/?srvMaxHosts=0"
+uri: "mongodb+srv://test24.test.build.10gen.cc/?srvMaxHosts=0"
seeds:
- - localhost.test.build.10gen.cc:27017
+ - localhost.test.build.10gen.cc:8000
hosts:
- - localhost.test.build.10gen.cc:27017
+ - localhost.test.build.10gen.cc:8000
options:
loadBalanced: true
srvMaxHosts: 0
diff --git a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero.json b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero.json
index 2382fccf852..bd854181175 100644
--- a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero.json
+++ b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero.json
@@ -1,10 +1,10 @@
{
- "uri": "mongodb+srv://test3.test.build.10gen.cc/?loadBalanced=true&srvMaxHosts=0",
+ "uri": "mongodb+srv://test23.test.build.10gen.cc/?loadBalanced=true&srvMaxHosts=0",
"seeds": [
- "localhost.test.build.10gen.cc:27017"
+ "localhost.test.build.10gen.cc:8000"
],
"hosts": [
- "localhost.test.build.10gen.cc:27017"
+ "localhost.test.build.10gen.cc:8000"
],
"options": {
"loadBalanced": true,
diff --git a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero.yml b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero.yml
index a8d3a19f36c..7dc15934844 100644
--- a/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero.yml
+++ b/tests/MongoDB.Driver.Core.Tests/Specifications/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero.yml
@@ -1,9 +1,9 @@
# loadBalanced=true is permitted because srvMaxHosts is non-positive
-uri: "mongodb+srv://test3.test.build.10gen.cc/?loadBalanced=true&srvMaxHosts=0"
+uri: "mongodb+srv://test23.test.build.10gen.cc/?loadBalanced=true&srvMaxHosts=0"
seeds:
- - localhost.test.build.10gen.cc:27017
+ - localhost.test.build.10gen.cc:8000
hosts:
- - localhost.test.build.10gen.cc:27017
+ - localhost.test.build.10gen.cc:8000
options:
loadBalanced: true
srvMaxHosts: 0
diff --git a/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/cursors.json b/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/cursors.json
index 7da08c94d6c..8454f130df6 100644
--- a/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/cursors.json
+++ b/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/cursors.json
@@ -1,6 +1,6 @@
{
"description": "cursors are correctly pinned to connections for load-balanced clusters",
- "schemaVersion": "1.3",
+ "schemaVersion": "1.4",
"runOnRequirements": [
{
"topologies": [
@@ -996,11 +996,6 @@
},
{
"description": "listIndexes pins the cursor to a connection",
- "runOnRequirements": [
- {
- "serverless": "forbid"
- }
- ],
"operations": [
{
"name": "createIndex",
diff --git a/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/cursors.yml b/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/cursors.yml
index 98c9e3eabb4..283d2663d52 100644
--- a/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/cursors.yml
+++ b/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/cursors.yml
@@ -1,6 +1,6 @@
description: cursors are correctly pinned to connections for load-balanced clusters
-schemaVersion: '1.3'
+schemaVersion: '1.4'
runOnRequirements:
- topologies: [ load-balanced ]
@@ -398,8 +398,6 @@ tests:
- connectionCheckedInEvent: {}
- description: listIndexes pins the cursor to a connection
- runOnRequirements:
- - serverless: forbid
operations:
# There is an automatic index on _id so we create two more indexes to force multiple batches with batchSize=2.
- name: createIndex
diff --git a/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/sdam-error-handling.json b/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/sdam-error-handling.json
index 4ab34b1fed4..083c98e9418 100644
--- a/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/sdam-error-handling.json
+++ b/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/sdam-error-handling.json
@@ -1,6 +1,6 @@
{
"description": "state change errors are correctly handled",
- "schemaVersion": "1.3",
+ "schemaVersion": "1.4",
"runOnRequirements": [
{
"topologies": [
diff --git a/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/sdam-error-handling.yml b/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/sdam-error-handling.yml
index e3d6d6a251b..fdaba251494 100644
--- a/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/sdam-error-handling.yml
+++ b/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/sdam-error-handling.yml
@@ -1,6 +1,6 @@
description: state change errors are correctly handled
-schemaVersion: '1.3'
+schemaVersion: '1.4'
runOnRequirements:
- topologies: [ load-balanced ]
diff --git a/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/transactions.json b/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/transactions.json
index 8cf24f4ca4f..0dd04ee8540 100644
--- a/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/transactions.json
+++ b/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/transactions.json
@@ -1,6 +1,6 @@
{
"description": "transactions are correctly pinned to connections for load-balanced clusters",
- "schemaVersion": "1.3",
+ "schemaVersion": "1.4",
"runOnRequirements": [
{
"topologies": [
diff --git a/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/transactions.yml b/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/transactions.yml
index 29cbbee723f..3bb1e3b5426 100644
--- a/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/transactions.yml
+++ b/tests/MongoDB.Driver.Tests/Specifications/load-balancers/tests/transactions.yml
@@ -1,6 +1,6 @@
description: transactions are correctly pinned to connections for load-balanced clusters
-schemaVersion: '1.3'
+schemaVersion: '1.4'
runOnRequirements:
- topologies: [ load-balanced ]