[Test] ee/spec/services/vulnerabilities/archival/restoration/restore_for_group_service_spec.rb:319
The Vulnerabilities::Archival::Restoration::RestoreForGroupService.execute partition reading uses the correct database connection while reading data from partitions directly spec is flaky, and is sometimes failing with a PG::QueryCanceled error due to timeout.
Sample jobs:
- https://gitlab.com/gitlab-org/gitlab/-/jobs/11889533240#L2392
- https://gitlab.com/gitlab-org/gitlab/-/jobs/11889578090#L3336
- https://gitlab.com/gitlab-org/gitlab/-/jobs/11887015792#L4932
Local failing job log:
bundle exec rspec ee/spec/services/vulnerabilities/archival/restoration/restore_for_group_service_spec.rb:319
Run options: include {:focus=>true, :locations=>{"./ee/spec/services/vulnerabilities/archival/restoration/restore_for_group_service_spec.rb"=>[319]}}
==> Go projects set up in 0.686 seconds...
Test environment set up in 1.9531340000103228 seconds
F
Failures:
  1) Vulnerabilities::Archival::Restoration::RestoreForGroupService.execute partition reading uses the correct database connection while reading data from partitions directly
     Failure/Error: expect { restore }.to change { Vulnerability.count }.by(1)
       expected `Vulnerability.count` to have changed by 1, but was changed by 0
     # ./ee/spec/services/vulnerabilities/archival/restoration/restore_for_group_service_spec.rb:321:in `block (4 levels) in <top (required)>'
     # ./spec/spec_helper.rb:604:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:496:in `block (3 levels) in <top (required)>'
     # ./lib/gitlab/sidekiq_sharding/validator.rb:42:in `enabled'
     # ./spec/spec_helper.rb:495:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:490:in `block (3 levels) in <top (required)>'
     # ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
     # ./spec/spec_helper.rb:481:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:477:in `block (3 levels) in <top (required)>'
     # ./lib/gitlab/application_context.rb:103:in `with_raw_context'
     # ./spec/spec_helper.rb:477:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:448:in `block (3 levels) in <top (required)>'
     # ./lib/gitlab/ci/config/feature_flags.rb:38:in `ensure_correct_usage'
     # ./spec/spec_helper.rb:447:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:434:in `block (2 levels) in <top (required)>'
     # ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <main>'
     # ./spec/support/database/prevent_cross_joins.rb:106:in `block (3 levels) in <main>'
     # ./spec/support/database/prevent_cross_joins.rb:60:in `with_cross_joins_prevented'
     # ./spec/support/database/prevent_cross_joins.rb:106:in `block (2 levels) in <main>'
Finished in 12.75 seconds (files took 16.59 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./ee/spec/services/vulnerabilities/archival/restoration/restore_for_group_service_spec.rb:319 # Vulnerabilities::Archival::Restoration::RestoreForGroupService.execute partition reading uses the correct database connection while reading data from partitions directly
Randomized with seed 52853Edited  by 🤖 GitLab Bot 🤖