Skip to content

Commit e1c85a6

Browse files
authored
Add timeout to RequestBagTests.testCancelFailsTaskAfterRequestIsSent test (#699)
We have seen that the `RequestBagTests.testCancelFailsTaskAfterRequestIsSent` can timeout the CI. To better understand where it fails we can add a timeout that will throw with a timeout error and fail the error check below it. This will make will allow us in the future to better analyse the failure and will no longer timeout the CI.
1 parent 7935de1 commit e1c85a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/AsyncHTTPClientTests/RequestBagTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ final class RequestBagTests: XCTestCase {
345345
bag.fail(HTTPClientError.cancelled)
346346
XCTAssertTrue(executor.isCancelled, "The request bag, should call cancel immediately on the executor")
347347

348-
XCTAssertThrowsError(try bag.task.futureResult.wait()) {
348+
XCTAssertThrowsError(try bag.task.futureResult.timeout(after: .seconds(10)).wait()) {
349349
XCTAssertEqual($0 as? HTTPClientError, .cancelled)
350350
}
351351
}

0 commit comments

Comments
 (0)