Skip to content

rspec fail-fast should not run tests if they are going to take more than 20min

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Context

In https://gitlab.slack.com/archives/C2T9APP9C/p1727184974767909, an MR repeateadly failed the rspec-ee fail-fast job because the specs took more than 80 minutes to run:

# [RSpecRunTime] Finishing example group ee/spec/lib/search/navigation_spec.rb. It took 10.15 seconds. Expected to take 20.24 seconds.
# [RSpecRunTime] Finishing example group ee/spec/models/search_spec.rb. It took 0.28 second. Expected to take 0.81 second.
# [RSpecRunTime] Finishing example group ee/spec/services/search/global_service_blob_and_commit_spec.rb. It took 12 minutes 50.92 seconds. Expected to take 12 minutes 43.82 seconds.
# [RSpecRunTime] Finishing example group ee/spec/services/search/global_service_spec.rb. It took 18 minutes 36.3 seconds. Expected to take 21 minutes 47.43 seconds.
# [RSpecRunTime] Finishing example group ee/spec/services/search/group_service_blob_and_commit_visibility_spec.rb. It took 15 minutes 8.39 seconds. Expected to take 16 minutes 2.96 seconds.
# [RSpecRunTime] Finishing example group ee/spec/services/search/group_service_spec.rb. It took 8 minutes 20.59 seconds. Expected to take 11 minutes 20.71 seconds.
# [RSpecRunTime] Finishing example group ee/spec/services/search/group_service_wiki_visibility_spec.rb. It took 3 minutes 24.56 seconds. Expected to take 4 minutes 15.36 seconds.
# [RSpecRunTime] Finishing example group ee/spec/services/search/project_service_blob_and_commit_spec.rb. It took 21 minutes 29.48 seconds. Expected to take 25 minutes 10.08 seconds.

The expected time for those 8 spec files is above 90min.

Goal

Do not run tests if we see from the expected duration that they will take more than 20 minutes.

Edited by 🤖 GitLab Bot 🤖