Skip to content

Commit e60149e

Browse files
committed
fixup
1 parent 4420abe commit e60149e

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

projects/RabbitMQ.Client/client/impl/ChannelBase.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1825,7 +1825,9 @@ await tokenRegistration.DisposeAsync()
18251825
}
18261826
}
18271827

1828-
private void HandleAckNack(ulong deliveryTag, bool multiple, bool isNack)
1828+
// NOTE: this method is internal for its use in this test:
1829+
// TestWaitForConfirmsWithTimeoutAsync_MessageNacked_WaitingHasTimedout_ReturnFalse
1830+
internal void HandleAckNack(ulong deliveryTag, bool multiple, bool isNack)
18291831
{
18301832
// Only do this if confirms are enabled *and* the library is tracking confirmations
18311833
if (ConfirmsAreEnabled && _trackConfirmations)

projects/Test/Integration/TestPublisherConfirms.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
//---------------------------------------------------------------------------
3131

3232
using System;
33-
using System.Reflection;
3433
using System.Threading;
3534
using System.Threading.Tasks;
3635
using RabbitMQ.Client;
@@ -105,12 +104,8 @@ public Task TestWaitForConfirmsWithTimeoutAsync_MessageNacked_WaitingHasTimedout
105104
{
106105
return TestWaitForConfirmsAsync(2000, async (ch) =>
107106
{
108-
IChannel actualChannel = ((AutorecoveringChannel)ch).InnerChannel;
109-
actualChannel
110-
.GetType()
111-
.GetMethod("HandleAckNack", BindingFlags.Instance | BindingFlags.NonPublic)
112-
.Invoke(actualChannel, new object[] { 10UL, false, true });
113-
107+
RecoveryAwareChannel actualChannel = ((AutorecoveringChannel)ch).InnerChannel;
108+
actualChannel.HandleAckNack(10UL, false, true);
114109
using (var cts = new CancellationTokenSource(ShortSpan))
115110
{
116111
Assert.False(await ch.WaitForConfirmsAsync(cts.Token));

0 commit comments

Comments
 (0)