Skip to content

Commit 416eecd

Browse files
committed
* Fix TestBindingRecovery_GH1035
1 parent c500fcf commit 416eecd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

projects/Test/Common/TestConnectionRecoveryBase.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public class TestConnectionRecoveryBase : IntegrationFixture
4646
protected const ushort TotalMessageCount = 16384;
4747
protected const ushort CloseAtCount = 16;
4848

49-
public TestConnectionRecoveryBase(ITestOutputHelper output) : base(output)
49+
public TestConnectionRecoveryBase(ITestOutputHelper output, bool dispatchConsumersAsync = false)
50+
: base(output, dispatchConsumersAsync: dispatchConsumersAsync)
5051
{
5152
_messageBody = GetRandomBody(4096);
5253
}
@@ -226,7 +227,7 @@ protected static TaskCompletionSource<bool> PrepareForShutdown(IConnection conn)
226227
var tcs = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
227228

228229
AutorecoveringConnection aconn = conn as AutorecoveringConnection;
229-
aconn.ConnectionShutdown += (c, args) => tcs.SetResult(true);
230+
aconn.ConnectionShutdown += (c, args) => tcs.TrySetResult(true);
230231

231232
return tcs;
232233
}

0 commit comments

Comments
 (0)