Skip to content

Commit 742e038

Browse files
authored
chore: Fix warnings on integration tests (#2041)
1 parent 7cfcc98 commit 742e038

File tree

7 files changed

+7
-4
lines changed

7 files changed

+7
-4
lines changed

IntegrationTests/AWSIntegrationTestUtils/ConcurrentTestHelper.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public func repeatConcurrently(
3636
/// - test: The function pointer for the test to run
3737
/// - args: Any values to pass along to test function
3838
/// - Throws: Any error thrown by one of the test runs.
39+
@Sendable
3940
public func repeatConcurrentlyWithArgs<Arg: Sendable>(
4041
count: Int,
4142
test: @escaping @Sendable (Arg) async throws -> Void,

IntegrationTests/Services/AWSBedrockRuntimeIntegrationTests/InvokeModelWithBidirectionalStreamTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ final class InvokeModelWithBidirectionalStreamTest: XCTestCase {
193193
(inputStream, continuation) = AsyncThrowingStream.makeStream()
194194

195195
// Start up background task that feeds events to the stream.
196-
Task {
196+
Task { [CONTENT_END_EVENT, PROMPT_END_EVENT, requestEvents] in
197197
for event in requestEvents {
198198
let currentEvent = BedrockRuntimeClientTypes.InvokeModelWithBidirectionalStreamInput.chunk(
199199
BedrockRuntimeClientTypes.BidirectionalInputPayloadPart(bytes: event.data(using: .utf8))

IntegrationTests/Services/AWSDynamoDBIntegrationTests/AccountIDEndpointModeTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ final class AccountIDEndpointModeTests: XCTestCase {
137137
) async throws -> DynamoDBClient {
138138
let accountID = setAccountID ? self.accountID : nil
139139
let credentials = AWSCredentialIdentity(accessKey: "abc", secret: "def", accountID: accountID)
140-
let resolver = try StaticAWSCredentialIdentityResolver(credentials)
140+
let resolver = StaticAWSCredentialIdentityResolver(credentials)
141141
let config = try await DynamoDBClient.Config(
142142
awsCredentialIdentityResolver: resolver,
143143
region: "us-east-1",

IntegrationTests/Services/AWSDynamoDBIntegrationTests/QueryCompatibleSanityCheck.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ final class QueryCompatibleTest: XCTestCase {
3838
}
3939

4040
let credentials = AWSCredentialIdentity(accessKey: "test", secret: "test")
41-
let resolver = try StaticAWSCredentialIdentityResolver(credentials)
41+
let resolver = StaticAWSCredentialIdentityResolver(credentials)
4242

4343
let config = try await DynamoDBClient.Config(
4444
awsCredentialIdentityResolver: resolver,

IntegrationTests/Services/AWSS3IntegrationTests/S3ConcurrentTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ final class S3ConcurrentTests: S3XCTestCase, @unchecked Sendable {
3939
// MARK: - Private methods
4040

4141
// Puts data to S3, gets the uploaded file, asserts retrieved data == original data, deletes S3 object
42+
@Sendable
4243
private func getObject(data: Data) async throws {
4344
let objectKey = UUID().uuidString.split(separator: "-").first!.lowercased()
4445
let putObjectInput = PutObjectInput(body: .data(data), bucket: bucketName, key: objectKey)

IntegrationTests/Services/AWSS3IntegrationTests/S3ErrorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class S3ErrorTests: S3XCTestCase {
7575
func test_InvalidAccessKeyID_isThrownWhenAppropriate() async throws {
7676
do {
7777
let credentials = AWSCredentialIdentity(accessKey: "AKIDEXAMPLE", secret: "wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY")
78-
let awsCredentialIdentityResolver = try StaticAWSCredentialIdentityResolver(credentials)
78+
let awsCredentialIdentityResolver = StaticAWSCredentialIdentityResolver(credentials)
7979
let config = try await S3Client.S3ClientConfiguration(awsCredentialIdentityResolver: awsCredentialIdentityResolver, region: region)
8080
let input = GetObjectInput(bucket: bucketName, key: UUID().uuidString)
8181
_ = try await S3Client(config: config).getObject(input: input)

IntegrationTests/Services/AWSTranscribeStreamingIntegrationTests/TranscribeStreamingTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ final class TranscribeStreamingTests: XCTestCase, @unchecked Sendable {
115115
//
116116
// Normal retry is not applied to transcribe streaming because the request body is a
117117
// non-rewindable stream.
118+
@Sendable
118119
private func attempt() async throws {
119120
// These throttling / resource limit errors may be returned based on the number of
120121
// recent requests made to AWSTranscribeStreaming.

0 commit comments

Comments
 (0)