-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add retry information headers (#692)
* Organize test files and directories to mirror code files and directory structure. * Add withSocket utility method & AttributeKeys related to TTL (socketTimeout & estimatedSkew). * Make socketTimeout to default to 60 seconds. * Add codegen that saves socketTimeout from HttpClientConfiguration into middleware context. * Add utility functions; one that calculates estimated skew from date string & one that calculates TTL by adding estimated skew and socket timeout to current time according to local machine clock. * Make DeserializeMiddleware save estimated skew calculated from returned HTTP response's Date header value. * Make RetryMiddleware add retry information headers as defined in SEP. * Fix dateFormatter in getTTL utility method to take raw date and convert to string without any adjustments. * Add tests for the 2 utility methods getTTL & getEstimatedSkew. Augment existing RetryIntegrationTests to check retry information headers in inputs. * Update codegen test to include socketTimeout addition. * Add dummy values needed for context used by retry middleware tests. * Change a couple XCTAssert to XCTAssertEqual for better log message. * Make socketTimeout non-optional given default value is being set now. * Log .info level message then proceed with default values instead of throwing an error. * Fix socket timeout related errors. * Fix syntax error. --------- Co-authored-by: Sichan Yoo <[email protected]>
- Loading branch information
Showing
31 changed files
with
171 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters