diff --git a/Tests/AsyncHTTPClientTests/RequestBagTests.swift b/Tests/AsyncHTTPClientTests/RequestBagTests.swift index 54de39e12..75d57ba26 100644 --- a/Tests/AsyncHTTPClientTests/RequestBagTests.swift +++ b/Tests/AsyncHTTPClientTests/RequestBagTests.swift @@ -345,7 +345,7 @@ final class RequestBagTests: XCTestCase { bag.fail(HTTPClientError.cancelled) XCTAssertTrue(executor.isCancelled, "The request bag, should call cancel immediately on the executor") - XCTAssertThrowsError(try bag.task.futureResult.wait()) { + XCTAssertThrowsError(try bag.task.futureResult.timeout(after: .seconds(10)).wait()) { XCTAssertEqual($0 as? HTTPClientError, .cancelled) } }