Skip to content

Commit 647d465

Browse files
authored
CSHARP-4988: Fix flaky ServerMonitor test (#1277)
1 parent a90f0ab commit 647d465

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

tests/MongoDB.Driver.Core.Tests/Core/Servers/ServerMonitorTests.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,14 +312,8 @@ public void RoundTripTimeMonitor_should_be_started_only_once_if_using_streaming_
312312
mockConnection.EnqueueCommandResponseMessage(CreateHeartbeatCommandResponseMessage(), null);
313313

314314
subject.Initialize();
315-
// spin until the initial handshake has happened in which case the server description state should be Connected
316-
SpinWait.SpinUntil(() => subject.Description.State == ServerState.Connected, TimeSpan.FromSeconds(5)).Should().BeTrue();
317-
318-
// RTT thread should be started after first heartbeat (initial handshake)
319-
mockRoundTripTimeMonitor.Verify(m => m.Start(), Times.Once);
320315

321316
SpinWait.SpinUntil(() => capturedEvents.Count >= 4, TimeSpan.FromSeconds(5)).Should().BeTrue();
322-
323317
mockRoundTripTimeMonitor.Verify(m => m.Start(), Times.Once);
324318
mockRoundTripTimeMonitor.Verify(m => m.IsStarted, Times.AtLeast(4));
325319
subject.Dispose();

0 commit comments

Comments
 (0)