From 8dbf14798fbaae6c4eea7f7237d235718b65d457 Mon Sep 17 00:00:00 2001 From: George Barnett Date: Mon, 4 Aug 2025 09:31:59 +0100 Subject: [PATCH] Remove test assertion in HTTP2ConnectionTests/testSimpleGetRequest Motivation: testSimpleGetRequest asserts right after submitting the request for execution that no streams have been closed. While unlikely there's nothing to prevent this assertion from failing (and indeed it has failed): the request may have executed immediately and the stream closed before checking the delegate. Modifications: - Remove the assertion Result: Tests are less flaky --- Tests/AsyncHTTPClientTests/HTTP2ConnectionTests.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Tests/AsyncHTTPClientTests/HTTP2ConnectionTests.swift b/Tests/AsyncHTTPClientTests/HTTP2ConnectionTests.swift index 3244e2b5a..14a4d5630 100644 --- a/Tests/AsyncHTTPClientTests/HTTP2ConnectionTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTP2ConnectionTests.swift @@ -115,7 +115,6 @@ class HTTP2ConnectionTests: XCTestCase { http2Connection.executeRequest(requestBag) - XCTAssertEqual(delegate.hitStreamClosed, 0) var maybeResponse: HTTPClient.Response? XCTAssertNoThrow(maybeResponse = try requestBag.task.futureResult.wait()) XCTAssertEqual(maybeResponse?.status, .ok)