Skip to content

Commit f8d9441

Browse files
committed
Disable ReIndexOperation write concern tests if server is 3.5.2.
1 parent ebaabb8 commit f8d9441

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tests/MongoDB.Driver.Core.Tests/Core/Operations/FindOperationTests.cs

-1
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,6 @@ public void Execute_should_throw_when_ReadConcern_is_set_but_not_supported(
537537
ReadConcern = ReadConcern.Majority
538538
};
539539

540-
async = false;
541540
var exception = Record.Exception(() => { ExecuteOperation(subject, async); });
542541

543542
exception.Should().BeOfType<MongoClientException>();

tests/MongoDB.Driver.Core.Tests/Core/Operations/ReIndexOperationTests.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,18 @@ public void Execute_should_throw_when_a_write_concern_error_occurs(
113113
bool async)
114114
{
115115
RequireServer.Check().Supports(Feature.CommandsThatWriteAcceptWriteConcern).ClusterType(ClusterType.ReplicaSet);
116+
var actualVersion = CoreTestConfiguration.ServerVersion;
117+
if (actualVersion.Major == 3 && actualVersion.Minor == 5 && actualVersion.Patch == 2)
118+
{
119+
// skip test on any version of 3.5.2
120+
return; // TODO: remove later
121+
}
116122
EnsureCollectionExists();
117123
var subject = new ReIndexOperation(_collectionNamespace, _messageEncoderSettings)
118124
{
119125
WriteConcern = new WriteConcern(9)
120126
};
121127

122-
async = false;
123128
var exception = Record.Exception(() => ExecuteOperation(subject, async));
124129

125130
exception.Should().BeOfType<MongoWriteConcernException>();

0 commit comments

Comments
 (0)