Skip to content
Snippets Groups Projects
Unverified Commit 862f74a1 authored by Sofia Vistas's avatar Sofia Vistas Committed by GitLab
Browse files

Increase rate limit for test

Enable the parallel to test
parent 290cd04f
Branches andrey-remove-group-caching
No related tags found
No related merge requests found
Loading
@@ -16,11 +16,11 @@ module QA
Loading
@@ -16,11 +16,11 @@ module QA
it 'throttles authenticated api requests by user', it 'throttles authenticated api requests by user',
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347881' do testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347881' do
with_application_settings( with_application_settings(
throttle_authenticated_api_requests_per_period: 5, throttle_authenticated_api_requests_per_period: 100,
throttle_authenticated_api_period_in_seconds: 60, throttle_authenticated_api_period_in_seconds: 60,
throttle_authenticated_api_enabled: true throttle_authenticated_api_enabled: true
) do ) do
5.times do 100.times do
res = RestClient.get request.url res = RestClient.get request.url
expect(res.code).to be(200) expect(res.code).to be(200)
end end
Loading
@@ -30,15 +30,15 @@ module QA
Loading
@@ -30,15 +30,15 @@ module QA
end end
end end
end end
end
   
private private
   
def with_application_settings(**hargs) def with_application_settings(**hargs)
QA::Runtime::ApplicationSettings.set_application_settings(**hargs) QA::Runtime::ApplicationSettings.set_application_settings(**hargs)
yield yield
ensure ensure
QA::Runtime::ApplicationSettings.restore_application_settings(*hargs.keys) QA::Runtime::ApplicationSettings.restore_application_settings(*hargs.keys)
end
end end
end end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment