Fix flaky quarantined spec/requests/api/graphql/ci/jobs_spec.rb:89
Job #1856220789 failed for f11ca956:
1) Query.project.pipeline .stages.groups.jobs when there is more than one stage and job needs reports the build needs and execution requirements
Failure/Error:
expect(jobs_graphql_data).to contain_exactly(
a_hash_including(
'name' => 'my test job',
'needs' => { 'nodes' => [] },
'previousStageJobsOrNeeds' => { 'nodes' => [] }
),
a_hash_including(
'name' => 'docker 1 2',
'needs' => { 'nodes' => [] },
'previousStageJobsOrNeeds' => { 'nodes' => [
expected collection contained: [(a hash including {"name" => "my test job", "needs" => {"nodes" => []}, "previousStageJobsOrNeeds" =...ame" => "my test job"})]}, "previousStageJobsOrNeeds" => {"nodes" => [{"name" => "my test job"}]}})]
actual collection contained: [{"detailedStatus"=>{"id"=>"pending-252-252"}, "name"=>"my test job", "needs"=>{"nodes"=>[]}, "pipeli..."gid://gitlab/Ci::Pipeline/261"}, "previousStageJobsOrNeeds"=>{"nodes"=>[{"name"=>"my test job"}]}}]
the missing elements were: [(a hash including {"name" => "rspec 1 2", "needs" => {"nodes" => []}, "previousStageJobsOrNeeds" => {"nodes" => [{"name" => "docker 1 2"}, {"name" => "docker 2 2"}]}})]
the extra elements were: [{"detailedStatus"=>{"id"=>"pending-255-255"}, "name"=>"rspec 1 2", "needs"=>{"nodes"=>[]}, "pipeline"=>{"id"=>"gid://gitlab/Ci::Pipeline/261"}, "previousStageJobsOrNeeds"=>{"nodes"=>[]}}]
# ./spec/requests/api/graphql/ci/jobs_spec.rb:92:in `block (4 levels) in <top (required)>'
# ./spec/spec_helper.rb:412:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:403:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:399:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:31:in `with_raw_context'
# ./spec/spec_helper.rb:399:in `block (2 levels) in <top (required)>'
# ./spec/support/flaky_tests.rb:27:in `block (2 levels) in <top (required)>'
# ./spec/support/database/query_analyzer.rb:9:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/database/query_analyzer.rb:42:in `within'
# ./spec/support/database/query_analyzer.rb:9:in `block (2 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (3 levels) in <top (required)>'
# ./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 <top (required)>'
Finished in 34 minutes 55 seconds (files took 1 minute 18.78 seconds to load)
2947 examples, 1 failure
Failed examples:
rspec ./spec/requests/api/graphql/ci/jobs_spec.rb:89 # Query.project.pipeline .stages.groups.jobs when there is more than one stage and job needs reports the build needs and execution requirements
Edited by Laura Montemayor