Skip to content

Commit fe4c4cb

Browse files
committed
Fix tests that are failing against latest server version.
1 parent 5c569d1 commit fe4c4cb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/MongoDB.Driver.Tests/Specifications/command-monitoring/TestRunner.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
using MongoDB.Bson.TestHelpers.XunitExtensions;
3030
using Xunit;
3131
using System.Collections;
32+
using MongoDB.Driver.Core.TestHelpers.XunitExtensions;
33+
using MongoDB.Driver.Core.Clusters;
3234

3335
namespace MongoDB.Driver.Tests.Specifications.command_monitoring
3436
{
@@ -104,6 +106,8 @@ public bool OneTimeSetup()
104106
[ClassData(typeof(TestCaseFactory))]
105107
public void RunTestDefinition(IEnumerable<BsonDocument> data, string databaseName, string collectionName, BsonDocument definition, bool async)
106108
{
109+
RequireServer.Check().ClusterTypes(ClusterType.ReplicaSet, ClusterType.Standalone);
110+
107111
definition = (BsonDocument)DeepCopy(definition); // protect against side effects when the same definition is run twice (async=false/true)
108112

109113
BsonValue bsonValue;

tests/MongoDB.Driver.Tests/Specifications/command-monitoring/tests/find.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ tests:
5252
$min: { _id: 0 }
5353
$returnKey: false
5454
$showDiskLoc: false
55-
$snapshot: false
5655
expectations:
5756
-
5857
command_started_event:
@@ -69,7 +68,6 @@ tests:
6968
min: { _id: 0 }
7069
returnKey: false
7170
showRecordId: false
72-
snapshot: false
7371
command_name: "find"
7472
database_name: *database_name
7573
-

0 commit comments

Comments
 (0)