Skip to content

Commit

Permalink
Disable ReIndexOperation write concern tests if server is 3.5.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
rstam committed Feb 1, 2017
1 parent ebaabb8 commit f8d9441
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,6 @@ public void Execute_should_throw_when_ReadConcern_is_set_but_not_supported(
ReadConcern = ReadConcern.Majority
};

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

exception.Should().BeOfType<MongoClientException>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,18 @@ public void Execute_should_throw_when_a_write_concern_error_occurs(
bool async)
{
RequireServer.Check().Supports(Feature.CommandsThatWriteAcceptWriteConcern).ClusterType(ClusterType.ReplicaSet);
var actualVersion = CoreTestConfiguration.ServerVersion;
if (actualVersion.Major == 3 && actualVersion.Minor == 5 && actualVersion.Patch == 2)
{
// skip test on any version of 3.5.2
return; // TODO: remove later
}
EnsureCollectionExists();
var subject = new ReIndexOperation(_collectionNamespace, _messageEncoderSettings)
{
WriteConcern = new WriteConcern(9)
};

async = false;
var exception = Record.Exception(() => ExecuteOperation(subject, async));

exception.Should().BeOfType<MongoWriteConcernException>();
Expand Down

0 comments on commit f8d9441

Please sign in to comment.