mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
parent
ec00482027
commit
9fb9a2c098
@ -151,6 +151,10 @@ describe Middleware::RequestTracker do
|
|||||||
|
|
||||||
@old_logger = Rails.logger
|
@old_logger = Rails.logger
|
||||||
Rails.logger = TestLogger.new
|
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
|
end
|
||||||
|
|
||||||
after do
|
after do
|
||||||
|
Loading…
Reference in New Issue
Block a user