DEV: freeze time when running rate limiter tests (#12315)

This avoids issues around clock skew making retry-after return 9 instead of
10
This commit is contained in:
Sam 2021-03-11 10:47:23 +11:00 committed by GitHub
parent ec00482027
commit 9fb9a2c098
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,6 +151,10 @@ describe Middleware::RequestTracker do
@old_logger = Rails.logger
Rails.logger = TestLogger.new
# rate limiter tests depend on checks for retry-after
# they can be sensitive to clock skew during test runs
freeze_time DateTime.parse('2021-01-01 01:00')
end
after do