From a05477fcf1c62c3627d12dbb0cc70b8787256dd5 Mon Sep 17 00:00:00 2001 From: Lily Vulcano Date: Mon, 7 Oct 2019 10:46:43 -0700 Subject: [PATCH] XFAIL the URLSession test suite We are blocking master, apparently, so XFAIL the entire thing. This needs to be reverted as soon as humanly possible. --- TestFoundation/Utilities.swift | 4 ++++ TestFoundation/main.swift | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/TestFoundation/Utilities.swift b/TestFoundation/Utilities.swift index 64b476e946..3b92960665 100644 --- a/TestFoundation/Utilities.swift +++ b/TestFoundation/Utilities.swift @@ -560,6 +560,10 @@ func shouldAttemptAndroidXFailTests(_ reason: String) -> Bool { #endif } +func testCaseExpectedToFail(_ allTests: [(String, (T) -> () throws -> Void)], _ reason: String) -> XCTestCaseEntry { + return testCase(allTests.map { ($0.0, testExpectedToFail($0.1, "This test suite is disabled: \(reason)")) }) +} + func appendTestCaseExpectedToFail(_ reason: String, _ allTests: [(String, (T) -> () throws -> Void)], into array: inout [XCTestCaseEntry]) { if shouldAttemptXFailTests(reason) { array.append(testCase(allTests)) diff --git a/TestFoundation/main.swift b/TestFoundation/main.swift index 92c7d523ef..3feea111b9 100644 --- a/TestFoundation/main.swift +++ b/TestFoundation/main.swift @@ -93,7 +93,7 @@ var allTestCases = [ testCase(TestURLRequest.allTests), testCase(TestURLResponse.allTests), testCase(TestHTTPURLResponse.allTests), - testCase(TestURLSession.allTests), + testCaseExpectedToFail(TestURLSession.allTests, "URLSession test interdependencies are causing intermittent CI issues."), testCase(TestNSUUID.allTests), testCase(TestUUID.allTests), testCase(TestNSValue.allTests),