You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -229,12 +232,13 @@ public void Heartbeat_should_make_immediate_next_attempt_for_streaming_protocol(
229
232
:2;
230
233
capturedEvents.WaitForOrThrowIfTimeout(
231
234
events =>
232
-
events.Count(e =>eisServerDescriptionChangedEvent)>=expectedServerDescriptionChangedEventCount,// the connection has been initialized and the first heatbeat event has been fired
235
+
events.Count(e =>eisServerDescriptionChangedEvent)>=expectedServerDescriptionChangedEventCount,// the connection has been initialized and the first heartbeat event has been fired
233
236
TimeSpan.FromSeconds(10));
234
237
238
+
capturedEvents.Next().Should().BeOfType<ServerHeartbeatSucceededEvent>();// heartbeat succeeded before connection initialized
serverDescriptionChangedEvent=capturedEvents.Next().Should().BeOfType<ServerDescriptionChangedEvent>().Subject;// when we catch exceptions, we close the current connection, so opening connection will trigger one more ServerDescriptionChangedEvent
255
+
// when we catch exceptions, we close the current connection,
256
+
// so opening connection will trigger one more ServerHeartbeatSucceededEvent and ServerDescriptionChangedEvent
Copy file name to clipboardExpand all lines: tests/MongoDB.Driver.Tests/Specifications/connection-monitoring-and-pooling/ConnectionMonitoringAndPoolingTestRunner.cs
Copy file name to clipboardExpand all lines: tests/MongoDB.Driver.Tests/Specifications/server-discovery-and-monitoring/ServerDiscoveryAndMonitoringProseTests.cs
0 commit comments