DEV: Fix flakey search spec (#20185)

This commit is contained in:
Penar Musaraj 2023-02-06 14:35:05 -05:00 committed by GitHub
parent c540167982
commit 0ca2541b74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -409,12 +409,13 @@ RSpec.describe SearchController do
RateLimiter.enable
RateLimiter.clear_all!
t = Time.now
freeze_time t
unlimited_request("1.1.1.1")
unlimited_request("2.2.2.2")
limited_request("3.3.3.3")
t = Time.now
freeze_time t
freeze_time(t + 2)
unlimited_request("4.4.4.4")