Skip to content

Commit

Permalink
maybe?
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Jul 1, 2024
1 parent b67144c commit 81655ab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Test/AwsCommonRuntimeKitTests/http/HTTPTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ class HTTPTests: HTTPClientTestFixture {
let streamBase = try connection.makeRequest(requestOptions: httpRequestOptions)
try streamBase.activate()
XCTAssertFalse(onCompleteCalled)
let metrics = connectionManager.fetchMetrics()
XCTAssertTrue(metrics.availableConcurrency > 0)
XCTAssertTrue(metrics.leasedConcurrency > 0)

let data = TEST_DOC_LINE.data(using: .utf8)!
for chunk in data.chunked(into: 5) {
try await streamBase.writeChunk(chunk: chunk, endOfStream: false)
XCTAssertFalse(onCompleteCalled)
}
let metrics = connectionManager.fetchMetrics()
XCTAssertTrue(metrics.availableConcurrency > 0)
XCTAssertTrue(metrics.leasedConcurrency > 0)

XCTAssertFalse(onCompleteCalled)
// Sleep for 5 seconds to make sure onComplete is not triggerred
Expand Down

0 comments on commit 81655ab

Please sign in to comment.