Skip to content

Commit

Permalink
fix sdk.NowTime test shenanigans
Browse files Browse the repository at this point in the history
  • Loading branch information
lucix-aws committed Sep 16, 2024
1 parent be85217 commit 8f37381
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions aws/retry/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,16 @@ func TestAttemptMiddleware(t *testing.T) {
MaxAttempts: 3,
},
{
AttemptNum: 2,
AttemptTime: time.Date(2020, 8, 19, 10, 21, 30, 0, time.UTC),
AttemptNum: 2,
// note that here and everywhere else, time goes up two
// additional minutes because of the metrics calling
// sdk.NowTime twice
AttemptTime: time.Date(2020, 8, 19, 10, 23, 30, 0, time.UTC),
MaxAttempts: 3,
},
{
AttemptNum: 3,
AttemptTime: time.Date(2020, 8, 19, 10, 22, 30, 0, time.UTC),
AttemptTime: time.Date(2020, 8, 19, 10, 26, 30, 0, time.UTC),
MaxAttempts: 3,
},
},
Expand Down Expand Up @@ -369,7 +372,7 @@ func TestAttemptMiddleware(t *testing.T) {
},
{
AttemptNum: 2,
AttemptTime: time.Date(2020, 8, 19, 10, 21, 30, 0, time.UTC),
AttemptTime: time.Date(2020, 8, 19, 10, 23, 30, 0, time.UTC),
MaxAttempts: 3,
},
},
Expand Down

0 comments on commit 8f37381

Please sign in to comment.