Skip to content

Commit 80ad1ed

Browse files
committed
fix broken test
1 parent 42def12 commit 80ad1ed

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ let package = Package(
6262
.package(url: "https://github.com/awslabs/aws-crt-swift.git", exact: "0.54.2"),
6363
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
6464
.package(url: "https://github.com/open-telemetry/opentelemetry-swift", from: "1.13.0"),
65-
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.26.0"),
65+
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.22.0"),
6666
]
6767

6868
let isDocCEnabled = ProcessInfo.processInfo.environment["AWS_SWIFT_SDK_ENABLE_DOCC"] != nil

Tests/ClientRuntimeTests/NetworkingTests/URLSession/FoundationStreamBridgeTests.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import SmithyTestUtil
1717
import enum Smithy.LogAgentLevel
1818
import protocol Smithy.LogAgent
1919
import class SmithyStreams.BufferedStream
20+
import class SmithyHTTPClientAPI.HttpTelemetry
2021

2122
class FoundationStreamBridgeTests: XCTestCase {
2223

@@ -70,15 +71,18 @@ class FoundationStreamBridgeTests: XCTestCase {
7071
bridgeBufferSize: bridgeBufferSize,
7172
boundStreamBufferSize: boundStreamBufferSize,
7273
logger: TestLogger(),
73-
telemetry: HttpTelemetry(httpScope: "FoundationStreamBridgeTests"))
74+
telemetry: HttpTelemetry(
75+
httpScope: "FoundationStreamBridgeTests",
76+
telemetryProvider: DefaultTelemetry.provider
77+
))
7478
await subject.open()
7579

7680
// This will hold the data that is bridged from the ReadableStream to the Foundation InputStream
7781
var bridgedData = Data()
7882

7983
// Open the input stream & read it to either end-of-data or a stream error
8084
subject.inputStream.open()
81-
while ![.atEnd, .error].contains(subject.inputStream.streamStatus) {
85+
while ![Stream.Status.atEnd, Stream.Status.error].contains(subject.inputStream.streamStatus) {
8286

8387
// Copy the input stream to the temp buffer. When count is positive, bytes were read
8488
let count = subject.inputStream.read(tempBuffer, maxLength: tempBufferSize)

0 commit comments

Comments
 (0)