Skip to content

Commit 699b7db

Browse files
committed
Use DirectConnection to enable tests explicitly connecting to a replica set
1 parent d62e1c1 commit 699b7db

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

tests/MongoDB.Driver.TestHelpers/Core/XunitExtensions/RequireServer.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,9 @@ public RequireServer Supports(params Feature[] features)
171171
}
172172

173173
public RequireServer SupportsCausalConsistency()
174-
// Determine if we are running against Atlas local by determining if the Atlas connection
175-
// string is the same as the regular connection string when the cluster is standalone.
176-
// This means that if someone has setup Atlas specific tests locally, then these tests will
177-
// also run, otherwise we will skip them on a standalone cluster.
178174
=> CoreTestConfiguration.Cluster.Description.Type == Clusters.ClusterType.Standalone
179-
&& string.Equals(
180-
CoreTestConfiguration.ConnectionString.ToString(),
181-
Environment.GetEnvironmentVariable("ATLAS_SEARCH_URI"),
182-
StringComparison.Ordinal)
175+
&& CoreTestConfiguration.ConnectionString.DirectConnection
183176
? this
184-
// If the server is not standalone, then use the previous logic.
185177
: ClusterTypes(Clusters.ClusterType.Sharded, Clusters.ClusterType.ReplicaSet).SupportsSessions();
186178

187179
public RequireServer SupportsSessions()

0 commit comments

Comments
 (0)