DEV: Remove usages of RateLimiter.clear_all! (#247)
c.f. https://github.com/discourse/discourse/pull/22103
This commit is contained in:
parent
c31d33a50c
commit
b011f3ef8a
|
@ -194,13 +194,14 @@ describe DiscourseDataExplorer::QueryController do
|
|||
)
|
||||
end
|
||||
|
||||
before { RateLimiter.enable }
|
||||
|
||||
use_redis_snapshotting
|
||||
|
||||
it "limits query runs from API when using block mode" do
|
||||
global_setting :max_data_explorer_api_reqs_per_10_seconds, 1
|
||||
global_setting :max_data_explorer_api_req_mode, "block"
|
||||
|
||||
RateLimiter.enable
|
||||
RateLimiter.clear_all!
|
||||
|
||||
admin = Fabricate(:admin)
|
||||
api_key = Fabricate(:api_key, user: admin)
|
||||
|
||||
|
@ -226,9 +227,6 @@ describe DiscourseDataExplorer::QueryController do
|
|||
global_setting :max_data_explorer_api_reqs_per_10_seconds, 1
|
||||
global_setting :max_data_explorer_api_req_mode, "warn"
|
||||
|
||||
RateLimiter.enable
|
||||
RateLimiter.clear_all!
|
||||
|
||||
admin = Fabricate(:admin)
|
||||
api_key = Fabricate(:api_key, user: admin)
|
||||
|
||||
|
@ -249,9 +247,6 @@ describe DiscourseDataExplorer::QueryController do
|
|||
global_setting :max_data_explorer_api_reqs_per_10_seconds, 1
|
||||
global_setting :max_data_explorer_api_req_mode, "block"
|
||||
|
||||
RateLimiter.enable
|
||||
RateLimiter.clear_all!
|
||||
|
||||
query = make_query("SELECT 23 as my_value")
|
||||
|
||||
freeze_time
|
||||
|
|
Loading…
Reference in New Issue