Skip to content

Commit

Permalink
Update TestGetCurrentBucketStartTimeIsWithinBounds to include clockSk…
Browse files Browse the repository at this point in the history
…ew calculation
  • Loading branch information
MarcoPolo committed Oct 31, 2022
1 parent cfe8b60 commit e913a1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/transport/webtransport/cert_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func TestGetCurrentBucketStartTimeIsWithinBounds(t *testing.T) {
timeSinceUnixEpoch += time.Hour * 24 * 365
start := time.UnixMilli(timeSinceUnixEpoch.Milliseconds())

bucketStart := getCurrentBucketStartTime(start, offset)
bucketStart := getCurrentBucketStartTime(start.Add(-clockSkewAllowance), offset)
return !bucketStart.After(start.Add(-clockSkewAllowance)) || bucketStart.Equal(start.Add(-clockSkewAllowance))
}, nil))
}

0 comments on commit e913a1b

Please sign in to comment.