File tree 1 file changed +4
-8
lines changed
tests/MongoDB.Driver.Tests/Specifications/sessions
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -337,15 +337,11 @@ public void Ensure_cluster_times_are_not_gossiped_on_SDAM_commands()
337
337
eventCapturer. Clear ( ) ;
338
338
339
339
eventCapturer. WaitForOrThrowIfTimeout (
340
- events =>
340
+ capturedEvents =>
341
341
{
342
- var capturedEvents = events . ToArray ( ) ;
343
- return capturedEvents . Count ( e => e is ServerHeartbeatSucceededEvent ) > 1 &&
344
- capturedEvents
345
- . Where ( ( e , i ) =>
346
- e is ServerHeartbeatStartedEvent &&
347
- capturedEvents [ i + 1 ] is ServerHeartbeatSucceededEvent )
348
- . Any ( ) ;
342
+ return capturedEvents
343
+ . SkipWhile ( e => e is not ServerHeartbeatStartedEvent )
344
+ . Any ( e => e is ServerHeartbeatSucceededEvent ) ;
349
345
} , TimeSpan . FromSeconds ( 1 ) , "Didn't get any server heartbeat pairs" ) ;
350
346
351
347
c1. GetDatabase ( "admin" ) . RunCommand < BsonDocument > ( pingCommand ) ;
You can’t perform that action at this time.
0 commit comments