Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Add a dummy test #55457

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
using Microsoft.AspNetCore.Connections;
using Microsoft.AspNetCore.Connections.Features;
using Microsoft.AspNetCore.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Internal;
using Microsoft.AspNetCore.InternalTesting;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Internal;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Time.Testing;

Expand Down Expand Up @@ -280,6 +280,41 @@ public async Task AcceptAsync_ServerStartsAndStopsUnidirectionStream_ClientAccep
Assert.Equal(0, readCount);
}

[Fact]
public void DoubleCatch()
{
try
{
Logger.LogInformation("Try");
throw new QuicException(QuicError.ConnectionAborted, applicationErrorCode: null, "Message");
}
catch (QuicException ex) when (ex.QuicError == QuicError.ConnectionAborted)
{
Logger.LogInformation("ConnectionAborted");
throw new Exception("Repro failed");
}
catch (QuicException)
{
try
{
Assert.Fail("How did we get here?");
}
finally // Required for repro
{
Assert.Fail("How did we get here?");
}
}
catch (Exception)
{
Logger.LogInformation("Exception");
Assert.Fail("Repro succeeded");
}
finally
{
Logger.LogInformation("Finally");
}
}

[ConditionalFact]
[MsQuicSupported]
public async Task AcceptAsync_ClientClosesConnection_ExceptionThrown()
Expand Down
Loading