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

Disable MsQuicTests.CertificateCallbackThrowPropagates test #99108

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -357,7 +357,10 @@ public async Task UntrustedClientCertificateFails()
}
}

static bool SupportsAsyncCertValidation => QuicTestCollection.MsQuicVersion >= new Version(2, 4);

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/99074", typeof(MsQuicTests), nameof(SupportsAsyncCertValidation))]
public async Task CertificateCallbackThrowPropagates()
{
using CancellationTokenSource cts = new CancellationTokenSource(PassingTestTimeout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@
using Microsoft.Quic;
using static Microsoft.Quic.MsQuic;

namespace System.Net.Quic.Tests;

[CollectionDefinition(nameof(QuicTestCollection), DisableParallelization = true)]
public unsafe class QuicTestCollection : ICollectionFixture<QuicTestCollection>, IDisposable
{
public static bool IsSupported => QuicListener.IsSupported && QuicConnection.IsSupported;

public static Version MsQuicVersion { get; } = GetMsQuicVersion();

public QuicTestCollection()
{
string msQuicLibraryVersion = GetMsQuicLibraryVersion();
Expand Down Expand Up @@ -80,6 +84,13 @@ void DumpCounter(QUIC_PERFORMANCE_COUNTERS counter)
System.Console.WriteLine(sb.ToString());
}

private static Version GetMsQuicVersion()
{
Type msQuicApiType = Type.GetType("System.Net.Quic.MsQuicApi, System.Net.Quic");

return (Version)msQuicApiType.GetProperty("Version", BindingFlags.NonPublic | BindingFlags.Static).GetGetMethod(true).Invoke(null, Array.Empty<object?>());
}

private static string? GetMsQuicLibraryVersion()
{
Type msQuicApiType = Type.GetType("System.Net.Quic.MsQuicApi, System.Net.Quic");
Expand Down
Loading