File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/MongoDB.Driver.Core.Tests/Core/Connections Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -705,8 +705,17 @@ public void SendMessageshould_throw_MongoConnectionClosedException_for_waiting_t
705705 _capturedEvents. Next ( ) . Should ( ) . BeOfType < CommandStartedEvent > ( ) ;
706706 _capturedEvents. Next ( ) . Should ( ) . BeOfType < ConnectionFailedEvent > ( ) ;
707707 _capturedEvents. Next ( ) . Should ( ) . BeOfType < CommandFailedEvent > ( ) ;
708- _capturedEvents. Next ( ) . Should ( ) . BeOfType < CommandFailedEvent > ( ) ;
709- _capturedEvents. Next ( ) . Should ( ) . BeOfType < ConnectionSendingMessagesFailedEvent > ( ) ;
708+ var events7And8Types = new Type[ ]
709+ {
710+ _capturedEvents . Next ( ) . GetType ( ) ,
711+ _capturedEvents . Next ( ) . GetType ( )
712+ } ;
713+ var expectedEventTypes = new Type [ ]
714+ {
715+ typeof ( CommandFailedEvent ) ,
716+ typeof ( ConnectionSendingMessagesFailedEvent )
717+ } ;
718+ events7And8Types . Should ( ) . BeEquivalentTo ( expectedEventTypes ) ;
710719 _capturedEvents . Next ( ) . Should ( ) . BeOfType < ConnectionSendingMessagesFailedEvent > ( ) ;
711720 _capturedEvents . Any ( ) . Should ( ) . BeFalse ( ) ;
712721 }
You can’t perform that action at this time.
0 commit comments