Skip to content

Commit 86bc32b

Browse files
authored
Merge pull request #236 from stmontgomery/disable-expectation-test
Temporarily disable `test_multithreadedXCTestCaseConveniences`
2 parents 867fdc2 + 19c4217 commit 86bc32b

File tree

1 file changed

+3
-30
lines changed
  • Tests/Functional/Asynchronous/Expectations

1 file changed

+3
-30
lines changed

Tests/Functional/Asynchronous/Expectations/main.swift

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -461,32 +461,6 @@ class ExpectationsTestCase: XCTestCase {
461461
RunLoop.main.run(until: Date() + 1)
462462
}
463463

464-
// CHECK: Test Case 'ExpectationsTestCase.test_multithreadedXCTestCaseConveniences' started at \d+-\d+-\d+ \d+:\d+:\d+\.\d+
465-
// CHECK: Test Case 'ExpectationsTestCase.test_multithreadedXCTestCaseConveniences' passed \(\d+\.\d+ seconds\)
466-
func test_multithreadedXCTestCaseConveniences() {
467-
let iterationCount = 10 // Increase for more thorough stress test
468-
469-
for _ in 0..<iterationCount {
470-
let aStarted = XCTestExpectation(description: "Thread A started")
471-
let bStarted = XCTestExpectation(description: "Thread B started")
472-
let aFinished = XCTestExpectation(description: "Thread A finished")
473-
let bFinished = XCTestExpectation(description: "Thread B finished")
474-
475-
Thread.detachNewThread {
476-
aStarted.fulfill()
477-
self.wait(for: [bStarted], timeout: 1)
478-
aFinished.fulfill()
479-
}
480-
Thread.detachNewThread {
481-
bStarted.fulfill()
482-
self.wait(for: [aStarted], timeout: 1)
483-
bFinished.fulfill()
484-
}
485-
486-
wait(for: [aFinished, bFinished], timeout: 2)
487-
}
488-
}
489-
490464
static var allTests = {
491465
return [
492466
("test_waitingForAnUnfulfilledExpectation_fails", test_waitingForAnUnfulfilledExpectation_fails),
@@ -532,16 +506,15 @@ class ExpectationsTestCase: XCTestCase {
532506
// Regressions
533507
("test_fulfillmentOnSecondaryThread", test_fulfillmentOnSecondaryThread),
534508
("test_runLoopInsideDispatch", test_runLoopInsideDispatch),
535-
("test_multithreadedXCTestCaseConveniences", test_multithreadedXCTestCaseConveniences),
536509
]
537510
}()
538511
}
539512
// CHECK: Test Suite 'ExpectationsTestCase' failed at \d+-\d+-\d+ \d+:\d+:\d+\.\d+
540-
// CHECK: \t Executed 32 tests, with 17 failures \(0 unexpected\) in \d+\.\d+ \(\d+\.\d+\) seconds
513+
// CHECK: \t Executed 31 tests, with 17 failures \(0 unexpected\) in \d+\.\d+ \(\d+\.\d+\) seconds
541514

542515
XCTMain([testCase(ExpectationsTestCase.allTests)])
543516

544517
// CHECK: Test Suite '.*\.xctest' failed at \d+-\d+-\d+ \d+:\d+:\d+\.\d+
545-
// CHECK: \t Executed 32 tests, with 17 failures \(0 unexpected\) in \d+\.\d+ \(\d+\.\d+\) seconds
518+
// CHECK: \t Executed 31 tests, with 17 failures \(0 unexpected\) in \d+\.\d+ \(\d+\.\d+\) seconds
546519
// CHECK: Test Suite 'All tests' failed at \d+-\d+-\d+ \d+:\d+:\d+\.\d+
547-
// CHECK: \t Executed 32 tests, with 17 failures \(0 unexpected\) in \d+\.\d+ \(\d+\.\d+\) seconds
520+
// CHECK: \t Executed 31 tests, with 17 failures \(0 unexpected\) in \d+\.\d+ \(\d+\.\d+\) seconds

0 commit comments

Comments
 (0)