File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
RabbitMQ.Client/client/impl Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -409,6 +409,12 @@ public void AutomaticallyRecover(AutorecoveringConnection conn)
409
409
_connection = conn ;
410
410
RecoveryAwareModel defunctModel = _delegate ;
411
411
412
+ /*
413
+ * https://github.com/rabbitmq/rabbitmq-dotnet-client/issues/1140
414
+ * If this assignment is not done before recovering consumers, there is a good
415
+ * chance that an invalid Model will be used to handle a basic.deliver frame,
416
+ * with the resulting basic.ack never getting sent out.
417
+ */
412
418
_delegate = conn . CreateNonRecoveringModel ( ) ;
413
419
_delegate . InheritOffsetFrom ( defunctModel ) ;
414
420
@@ -419,7 +425,6 @@ public void AutomaticallyRecover(AutorecoveringConnection conn)
419
425
RecoverBasicAckHandlers ( ) ;
420
426
RecoverBasicNackHandlers ( ) ;
421
427
RecoverCallbackExceptionHandlers ( ) ;
422
-
423
428
RunRecoveryEventHandlers ( ) ;
424
429
}
425
430
Original file line number Diff line number Diff line change @@ -675,6 +675,7 @@ internal void StopRabbitMQ()
675
675
internal void StartRabbitMQ ( )
676
676
{
677
677
ExecRabbitMQCtl ( "start_app" ) ;
678
+ ExecRabbitMQCtl ( "await_startup" ) ;
678
679
}
679
680
680
681
//
Original file line number Diff line number Diff line change @@ -75,7 +75,6 @@ public void CleanUp()
75
75
}
76
76
77
77
[ Test ]
78
- [ Ignore ( "TODO flaky" ) ]
79
78
public void TestBasicAckAfterChannelRecovery ( )
80
79
{
81
80
var allMessagesSeenLatch = new ManualResetEventSlim ( false ) ;
@@ -98,7 +97,6 @@ public void TestBasicAckAfterChannelRecovery()
98
97
}
99
98
100
99
[ Test ]
101
- [ Ignore ( "TODO flaky" ) ]
102
100
public void TestBasicNackAfterChannelRecovery ( )
103
101
{
104
102
var allMessagesSeenLatch = new ManualResetEventSlim ( false ) ;
@@ -121,7 +119,6 @@ public void TestBasicNackAfterChannelRecovery()
121
119
}
122
120
123
121
[ Test ]
124
- [ Ignore ( "TODO flaky" ) ]
125
122
public void TestBasicRejectAfterChannelRecovery ( )
126
123
{
127
124
var allMessagesSeenLatch = new ManualResetEventSlim ( false ) ;
You can’t perform that action at this time.
0 commit comments