Skip to content

Commit 06700ca

Browse files
committed
CSHARP-3027: Improve pinning test
1 parent fea0c16 commit 06700ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/MongoDB.Driver.Tests/PinnedShardRouterTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ private DisposableMongoClient CreateDisposableClient(EventCapturer eventCapturer
176176
},
177177
useMultipleShardRouters);
178178
var timeOut = TimeSpan.FromSeconds(60);
179-
SpinWait.SpinUntil(() => client.Cluster.Description.Type != ClusterType.Unknown, timeOut).Should().BeTrue();
179+
bool AllServersConnected() => client.Cluster.Description.Servers.All(s => s.State == ServerState.Connected);
180+
SpinWait.SpinUntil(AllServersConnected, timeOut).Should().BeTrue();
180181
return client;
181182
}
182183

0 commit comments

Comments
 (0)