Job timeout risk: spec/features/merge_request/user_sees_merge_widget_spec.rb ran much longer than expected

Why was this issue created?

spec/features/merge_request/user_sees_merge_widget_spec.rb was reported to have:

  1. exceeded Knapsack's expected runtime by at least 50%, and
  2. been identified as a notable pipeline bottleneck and a job timeout risk

Suggested steps for investigation

  1. To reproduce in CI by running test files in the same order, you can follow the steps listed here.
  2. Identify if a specific test case is stalling the run time. Hint: You can search the job's log for Starting example group spec/features/merge_request/user_sees_merge_widget_spec.rb and view the elapsed time after each test case in the proceeding lines starting with [RSpecRunTime].
  3. If the test file is large, consider refactoring it into multiple files to allow better test parallelization across runners.
  4. If the run time cannot be fixed in time, consider quarantine the spec(s) to restore performance.

Run time details

  • Reported from pipeline 2639167 created at 2024-04-11T20:54:33Z
Field Value
Job URL rspec-system-pg14-6-32
Job total RSpec suite run time expected: 21 minutes 20.31 seconds, actual: 70 minutes 46.6 seconds
Spec file run time expected: 8 minutes 49.52 seconds, actual: 37 minutes 48.38 seconds
Spec file weight 53.42% of total suite run time
  • Reported from pipeline 4101974 created at 2025-04-30T23:52:32Z
Field Value
Job URL rspec-system-pg16-5-32
Job total RSpec suite run time expected: 25 minutes 16.03 seconds, actual: 74 minutes 48.52 seconds
Spec file run time expected: 11 minutes 32.31 seconds, actual: 37 minutes 1.04 seconds
Spec file weight 49.48% of total suite run time
  • Reported from pipeline 4116613 created at 2025-05-05T14:16:36Z
Field Value
Job URL rspec-system-pg16-single-db-ci-connection-5-32
Job total RSpec suite run time expected: 24 minutes 13.96 seconds, actual: 74 minutes 27.65 seconds
Spec file run time expected: 10 minutes 52.86 seconds, actual: 37 minutes 5.93 seconds
Spec file weight 49.82% of total suite run time
  • Reported from pipeline 5003037 created at 2025-12-18T02:06:03Z
Field Value
Job URL rspec-system-pg16-6-32
Job total RSpec suite run time expected: 31 minutes 1.27 seconds, actual: 73 minutes 28.2 seconds
Spec file run time expected: 11 minutes 25.65 seconds, actual: 29 minutes 39.26 seconds
Spec file weight 40.36% of total suite run time