Speed up spec/features/groups/group_runners_spec.rb
This file runs for way too long:
Finished in 3 minutes 45.6 seconds (files took 14.62 seconds to load)
54 examples, 0 failures
We can:
- remove some tests which should be covered on other test levels
- collapse "atomic" examples into a bigger
it
testing multiple things at once
From the discussion on !128607 (diffs):
This file is already way too complex and tests are very "atomic". It's a good thing most of the time, but not in the integration tests because every separate
it
re-runs the whole thing from scratch and waits for browser rendering.So normally I do something like:
let!(group_runner) let!(project_runner) let!(instance_runner) it 'page has everything' do visit_page expect(page).to have(group_runner) expect(page).to have(project_runner) expect(page).to have(instance_runner) #... 20 more expects like this end it 'creates a runner' do end it 'updates a runner' do end it 'deletes a runner' do end
It saves a lot of time running tests.
See: https://about.gitlab.com/handbook/engineering/development/ops/verify/runner/#slow-rspec-test-issues
Edited by Miguel Rincon