Skip to content

Commit 63899f9

Browse files
authored
Merge pull request #2533 from millenomi/xfail-urlsession
XFAIL the URLSession test suite
2 parents 7165d15 + a05477f commit 63899f9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

TestFoundation/Utilities.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,10 @@ func shouldAttemptAndroidXFailTests(_ reason: String) -> Bool {
560560
#endif
561561
}
562562

563+
func testCaseExpectedToFail<T: XCTestCase>(_ allTests: [(String, (T) -> () throws -> Void)], _ reason: String) -> XCTestCaseEntry {
564+
return testCase(allTests.map { ($0.0, testExpectedToFail($0.1, "This test suite is disabled: \(reason)")) })
565+
}
566+
563567
func appendTestCaseExpectedToFail<T: XCTestCase>(_ reason: String, _ allTests: [(String, (T) -> () throws -> Void)], into array: inout [XCTestCaseEntry]) {
564568
if shouldAttemptXFailTests(reason) {
565569
array.append(testCase(allTests))

TestFoundation/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ var allTestCases = [
9393
testCase(TestURLRequest.allTests),
9494
testCase(TestURLResponse.allTests),
9595
testCase(TestHTTPURLResponse.allTests),
96-
testCase(TestURLSession.allTests),
96+
testCaseExpectedToFail(TestURLSession.allTests, "URLSession test interdependencies are causing intermittent CI issues."),
9797
testCase(TestNSUUID.allTests),
9898
testCase(TestUUID.allTests),
9999
testCase(TestNSValue.allTests),

0 commit comments

Comments
 (0)