Merge pull request #2533 from millenomi/xfail-urlsession

XFAIL the URLSession test suite
diff --git a/TestFoundation/Utilities.swift b/TestFoundation/Utilities.swift
index 64b476e..3b92960 100644
--- a/TestFoundation/Utilities.swift
+++ b/TestFoundation/Utilities.swift
@@ -560,6 +560,10 @@
     #endif
 }
 
+func testCaseExpectedToFail<T: XCTestCase>(_ 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<T: XCTestCase>(_ 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 92c7d52..3feea11 100644
--- a/TestFoundation/main.swift
+++ b/TestFoundation/main.swift
@@ -93,7 +93,7 @@
     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),