File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Tests/SmithyRetriesTests/DefaultRetryStrategy Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public class SigV4Signer: SmithyHTTPAuthAPI.Signer {
5252 )
5353 }
5454
55- var signingConfig = try constructSigningConfig ( identity: identity, signingProperties: signingProperties)
55+ let signingConfig = try constructSigningConfig ( identity: identity, signingProperties: signingProperties)
5656
5757 let unsignedRequest = requestBuilder. build ( )
5858 let crtUnsignedRequest : HTTPRequestBase = isBidirectionalStreamingEnabled ?
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ final class DefaultRetryStrategyTests: XCTestCase {
2828
2929 override func setUp( ) {
3030 backoffStrategy = . init( )
31- backoffStrategy. random = { 1.0 }
31+ backoffStrategy. random = { @ Sendable ( ) -> Double in 1.0 }
3232 options = RetryStrategyOptions ( backoffStrategy: backoffStrategy, maxRetriesBase: 2 )
3333 subject = DefaultRetryStrategy ( options: options)
3434 mockSleeper = { self . actualDelay = $0 }
Original file line number Diff line number Diff line change @@ -16,15 +16,15 @@ final class ExponentialBackoffStrategyTests: XCTestCase {
1616 override func setUp( ) {
1717 subject = ExponentialBackoffStrategy ( )
1818 // Randomization is disabled to allow easy, repeatable verification of basic behavior.
19- subject. random = { 1.0 }
19+ subject. random = { @ Sendable ( ) -> Double in 1.0 }
2020 }
2121
2222 func test_backoffStrategy_multipliesByBackoffFactor( ) {
23- subject. random = { 0.25 }
23+ subject. random = { @ Sendable ( ) -> Double in 0.25 }
2424 XCTAssertEqual ( subject. computeNextBackoffDelay ( attempt: 0 ) , 0.25 )
25- subject. random = { 0.5 }
25+ subject. random = { @ Sendable ( ) -> Double in 0.5 }
2626 XCTAssertEqual ( subject. computeNextBackoffDelay ( attempt: 0 ) , 0.5 )
27- subject. random = { 0.75 }
27+ subject. random = { @ Sendable ( ) -> Double in 0.75 }
2828 XCTAssertEqual ( subject. computeNextBackoffDelay ( attempt: 0 ) , 0.75 )
2929 }
3030
You can’t perform that action at this time.
0 commit comments