Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ability to configure timeout in AWSClientConfiguration #1152

Merged
merged 8 commits into from
Sep 26, 2023

Conversation

dayaffe
Copy link
Contributor

@dayaffe dayaffe commented Sep 25, 2023

Add ability to configure connectTimeoutMs in AWSClientConfiguration.

Issue #

#1065
Companion PR: #592

Description of changes

  • expose connectTimeoutMs in AWSClientConfiguration which is used to create a CRTClientEngine() with the related configuration.

Ex. Usage (S3)

let client = try await S3Client(
    config: S3Client.S3ClientConfiguration(connectTimeoutMs: 15_000)
)

New/existing dependencies impact assessment, if applicable

Conventional Commits

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dayaffe dayaffe changed the title feat: add ability to configure timeout in AWSClientConfiguration #1151 feat: add ability to configure timeout in AWSClientConfiguration Sep 25, 2023
@dayaffe
Copy link
Contributor Author

dayaffe commented Sep 25, 2023

/test

Copy link
Contributor

@sichanyoo sichanyoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, except one typo nit in comment

Sources/Core/AWSClientRuntime/AWSClientConfiguration.swift Outdated Show resolved Hide resolved
@dayaffe
Copy link
Contributor Author

dayaffe commented Sep 26, 2023

/test

Copy link
Contributor

@jbelkins jbelkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple nits

Sources/Core/AWSClientRuntime/AWSClientConfiguration.swift Outdated Show resolved Hide resolved

// MARK: - Timeout

func test_async_configureTimeoutOptionsFromParams() throws {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need a test for default timeout?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding one now. Will check for 30_000 or 3_000 depending on the operating system the test is run on. There doesn't seem to be a way to force the OS in XCTest

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this test as default timeout info is in CRT and not available to AWSClientConfiguration

@dayaffe
Copy link
Contributor Author

dayaffe commented Sep 26, 2023

/test

@dayaffe
Copy link
Contributor Author

dayaffe commented Sep 26, 2023

/test

@dayaffe
Copy link
Contributor Author

dayaffe commented Sep 26, 2023

/test

@dayaffe dayaffe merged commit 8c3e24f into main Sep 26, 2023
10 checks passed
@dayaffe dayaffe deleted the day/expose-timeout branch September 26, 2023 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants