Skip to content

Commit 1a7414e

Browse files
craiggwilsonrstam
authored andcommitted
fixed GetReplicaSetConfig to use the proper name 'setVersion' instead of 'version'.
1 parent a2cf033 commit 1a7414e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/MongoDB.Driver.Core.Tests/Core/Connections/IsMasterResultTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public void GetReplicaSetConfig_should_return_correct_info_when_the_server_is_a_
201201
{ "hosts", new BsonArray(new [] { "localhost:1000", "localhost:1001" })},
202202
{ "passives", new BsonArray(new [] { "localhost:1002"}) },
203203
{ "arbiters", new BsonArray(new [] { "localhost:1003"}) },
204-
{ "version", 20 }
204+
{ "setVersion", 20 }
205205
};
206206

207207
var subject = new IsMasterResult(doc);

src/MongoDB.Driver.Core/Core/Connections/IsMasterResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ public ReplicaSetConfig GetReplicaSetConfig()
334334
var members = GetMembers();
335335
var name = (string)_wrapped.GetValue("setName", null);
336336
var primary = GetPrimary();
337-
var version = _wrapped.Contains("version") ? (int?)_wrapped["version"].ToInt32() : null;
337+
var version = _wrapped.Contains("setVersion") ? (int?)_wrapped["setVersion"].ToInt32() : null;
338338

339339
return new ReplicaSetConfig(members, name, primary, version);
340340
}

0 commit comments

Comments
 (0)