Skip to content

Commit e3b1183

Browse files
committed
GetAsync_UnsupportedSSLVersion_Throws - Fix exception being thrown when test have no data
1 parent 2018ffd commit e3b1183

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

StandardSocketsHttpHandler.FunctionalTests/HttpClientHandlerTest.SslProtocols.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ namespace System.Net.Http.Functional.Tests
1818
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "SslProtocols not supported on UAP")]
1919
public abstract partial class HttpClientHandler_SslProtocols_Test : HttpClientTestBase
2020
{
21+
private static bool IsWindows10Version1607OrGreater => PlatformDetection.IsWindows10Version1607OrGreater;
22+
2123
[Fact]
2224
public void DefaultProtocols_MatchesExpected()
2325
{
@@ -214,7 +216,7 @@ public static IEnumerable<object[]> NotSupportedSSLVersionServers()
214216
// We have tests that validate with SslStream, but that's limited by what the current OS supports.
215217
// This tests provides additional validation against an external server.
216218
[OuterLoop("Avoid www.ssllabs.com dependency in innerloop.")]
217-
[Theory]
219+
[ConditionalTheory(nameof(IsWindows10Version1607OrGreater))]
218220
[MemberData(nameof(NotSupportedSSLVersionServers))]
219221
public async Task GetAsync_UnsupportedSSLVersion_Throws(SslProtocols sslProtocols, string url)
220222
{

0 commit comments

Comments
 (0)