Spec failure in `spec/lib/gitlab/github_import/importer/events/cross_referenced_spec.rb` | Gitlab::GithubImport::Importer::Events::CrossReferenced when referenced in other issue creates expected note
Summary
Job https://gitlab.com/gitlab-org/gitlab/-/jobs/2772589949 failed for 8187a3ce
Failures:
1) Gitlab::GithubImport::Importer::Events::CrossReferenced when referenced in other issue creates expected note
Failure/Error: expect(issue.notes[0]).to have_attributes expected_note_attrs
expected #<Note id: 26, note: [FILTERED], noteable_type: "Issue", author_id: 3675, created_at: "2022-04-26 18:...change_position: nil, resolved_by_push: nil, review_id: nil, confidential: nil, last_edited_at: nil> to have attributes {"author_id" => 3675, "created_at" => 2022-04-26 18:30:53.000000000 +0000, "note" => "mentioned in issue #1", "noteable_id" => 543, "noteable_type" => "Issue", "project_id" => 1765, "system" => true} but had attributes {"author_id" => 3675, "created_at" => 2022-04-26 18:30:53.000000000 +0000, "note" => "mentioned in issue #11", "noteable_id" => 543, "noteable_type" => "Issue", "project_id" => 1765, "system" => true}
Diff:
@@ -1,6 +1,6 @@
"author_id" => 3675,
"created_at" => 2022-04-26 18:30:53.000000000 +0000,
-"note" => "mentioned in issue #1",
+"note" => "mentioned in issue #11",
"noteable_id" => 543,
"noteable_type" => "Issue",
"project_id" => 1765,
# ./spec/lib/gitlab/github_import/importer/events/cross_referenced_spec.rb:65:in `block (3 levels) in <main>'
# ./spec/spec_helper.rb:427:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:418:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:414:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:52:in `with_raw_context'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:265:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <main>'
# ./spec/support/redis.rb:13:in `block (2 levels) in <main>'
# ./spec/support/flaky_tests.rb:27: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>'
Steps to reproduce
I’m unable to reproduce it locally by running bundle exec rspec spec/lib/gitlab/github_import/importer/events/cross_referenced_spec.rb
, but it is failing in the pipelines when the tests are run parallel.
Proposed Resolution
Please refer to the Resolution guidance to learn more about resolution of broken master.
Edited by Nao Hashizume