Skip to content

Commit c04ec4b

Browse files
committed
Added Radek's test
1 parent 6306816 commit c04ec4b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/libraries/System.Net.Quic/tests/FunctionalTests/QuicConnectionTests.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,26 @@ await RunClientServer(
145145
});
146146
}
147147

148+
[Fact]
149+
public async Task DisposeAfterCloseTaskStored()
150+
{
151+
using var sync = new SemaphoreSlim(0);
152+
153+
await RunClientServer(
154+
async clientConnection =>
155+
{
156+
var cts = new CancellationTokenSource();
157+
var task = clientConnection.CloseAsync(0).AsTask();
158+
await clientConnection.DisposeAsync();
159+
sync.Release();
160+
},
161+
async serverConnection =>
162+
{
163+
await sync.WaitAsync();
164+
await serverConnection.DisposeAsync();
165+
});
166+
}
167+
148168
[Fact]
149169
public async Task ConnectionClosedByPeer_WithPendingAcceptAndConnect_PendingAndSubsequentThrowConnectionAbortedException()
150170
{

0 commit comments

Comments
 (0)