Skip to content

Commit c422c68

Browse files
committed
Add ConnectionShutdownAsync handler to try and get to the bottom of this flaky test.
1 parent 96a435b commit c422c68

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

projects/Test/Integration/TestConnectionShutdown.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ namespace Test.Integration
4646
public class TestConnectionShutdown : IntegrationFixture
4747
{
4848
// default Connection.Abort() timeout and then some
49-
private readonly TimeSpan _waitSpan = TimeSpan.FromSeconds(10);
49+
private readonly TimeSpan _waitSpan = TimeSpan.FromSeconds(6);
5050

5151
public TestConnectionShutdown(ITestOutputHelper output) : base(output)
5252
{
@@ -132,6 +132,15 @@ public async Task TestAbortWithSocketClosedOutOfBandAndCancellation()
132132
}
133133
};
134134

135+
_conn.ConnectionShutdownAsync += (c, args) =>
136+
{
137+
if (tcs.TrySetResult(true))
138+
{
139+
_output.WriteLine("[ERROR] {0}: completed tcs via ConnectionShutdownAsync", _testDisplayName);
140+
}
141+
return Task.CompletedTask;
142+
};
143+
135144
var c = (AutorecoveringConnection)_conn;
136145
ValueTask frameHandlerCloseTask = c.CloseFrameHandlerAsync();
137146

0 commit comments

Comments
 (0)