DEV: Use use_redis_snapshotting in rate limiting test (#22270)

Why is this change required?

Prevents the test from leaking state in Redis and ends up causing other
tests to become flaky.
This commit is contained in:
Alan Guo Xiang Tan 2023-06-26 09:47:00 +08:00 committed by GitHub
parent 486edb845c
commit fb8ce7d76e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -202,6 +202,8 @@ RSpec.describe Auth::DefaultCurrentUserProvider do
context "with rate limiting" do context "with rate limiting" do
before { RateLimiter.enable } before { RateLimiter.enable }
use_redis_snapshotting
it "rate limits admin api requests" do it "rate limits admin api requests" do
global_setting :max_admin_api_reqs_per_minute, 3 global_setting :max_admin_api_reqs_per_minute, 3