Skip to content

Commit a6e16e9

Browse files
committed
CSHARP-1264: WaitQueueSize setting did not affect the server selection wait queue.
Conflicts: src/MongoDB.Driver/ClusterRegistry.cs
1 parent caeb8a4 commit a6e16e9

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/MongoDB.Driver.Tests/ClusterRegistryTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public void GetOrCreateCluster_should_return_a_cluster_with_the_correct_settings
8282
cluster.Settings.EndPoints.Equals(endPoints);
8383
cluster.Settings.ReplicaSetName.Should().Be("rs");
8484
cluster.Settings.PostServerSelector.Should().NotBeNull().And.Subject.Should().BeOfType<LatencyLimitingServerSelector>();
85+
cluster.Settings.MaxServerSelectionWaitQueueSize.Should().Be(20);
8586

8687
var serverDescription = cluster.Description.Servers.Single(s => s.EndPoint.Equals(endPoints[0]));
8788
serverDescription.EndPoint.Should().Be(endPoints[0]);

src/MongoDB.Driver/ClusterRegistry.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ private ClusterSettings ConfigureCluster(ClusterSettings settings, ClusterKey cl
8484
connectionMode: clusterKey.ConnectionMode.ToCore(),
8585
endPoints: Optional.Enumerable(endPoints),
8686
replicaSetName: clusterKey.ReplicaSetName,
87+
maxServerSelectionWaitQueueSize: clusterKey.WaitQueueSize,
8788
postServerSelector: new LatencyLimitingServerSelector(clusterKey.LocalThreshold));
8889
}
8990

0 commit comments

Comments
 (0)