Skip to content

Commit 25ab872

Browse files
committed
fixed broken test when running tests against a replica set.
1 parent b09e211 commit 25ab872

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

MongoDB.DriverUnitTests/MongoServerTests.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,15 @@ public void TestReconnect()
224224
[Test]
225225
public void TestReplicaSetName()
226226
{
227-
Assert.IsNull(_server.ReplicaSetName);
227+
var instances = _server.Instances;
228+
if (instances.Length == 1)
229+
{
230+
Assert.IsNull(_server.ReplicaSetName);
231+
}
232+
else
233+
{
234+
Assert.IsNotNull(_server.ReplicaSetName);
235+
}
228236
}
229237

230238
[Test]

0 commit comments

Comments
 (0)