Skip to content

Commit

Permalink
troubleshooting gh build
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd committed Oct 20, 2023
1 parent d5ff66e commit d1836f9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/Flurl.Test/Http/FlurlClientBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,15 @@ public async Task can_add_middleware() {

[Test]
public void inner_hanlder_is_SocketsHttpHandler_when_supported() {
var supported = typeof(HttpClientHandler).Assembly.DefinedTypes.Any(t => t.Name == "SocketsHttpHandler");
var shh = typeof(HttpClientHandler).Assembly.DefinedTypes.FirstOrDefault(t => t.Name == "SocketsHttpHandler");
var supported = (shh != null);
#if NET
Assert.IsTrue(supported, "SocketsHttpHandler should be defined"); // sanity check (tests the test, basically)
#endif
if (supported) {
Console.WriteLine($"{shh.FullName} Found in {typeof(HttpClientHandler).Assembly.FullName}");
}

HttpMessageHandler handler = null;
new FlurlClientBuilder()
.ConfigureInnerHandler(h => handler = h)
Expand Down

0 comments on commit d1836f9

Please sign in to comment.