Flaky spec: spec/features/discussion_comments/commit_spec.rb[1:1:1]' # Thread Comments Commit behaves like thread comments for commit and snippet clicking "Comment" will post a comment
Summary
Job #3497221394 failed for 3ac26fe0:
Failures:
1) Thread Comments Commit behaves like thread comments for commit and snippet clicking "Comment" will post a comment
Got 1 failure and 1 other error:
Shared Example Group: "thread comments for commit and snippet" called from ./spec/features/discussion_comments/commit_spec.rb:21
1.1) Failure/Error: expect(new_comment).not_to have_selector '.discussion'
expected not to find visible css ".discussion" within #<Capybara::Node::Element tag="li" path="/HTML/BODY[1]/DIV[3]/DIV[1]/DIV[3]/MAIN[1]/DIV[2]/DIV[7]/UL[1]/LI[1]">, found 1 match: "Sidney Jones5\n@namespace3 started a thread just now\nLast updated by Sidney Jones6 just now\nHide thread\nSidney Jones5 @namespace3\n· just now\nOwner\nMy title 3\nSidney Jones6 @namespace4\n· just now\nMy title 4\nReply..."
Timeout (30s) reached while running a waiting Capybara finder.
Consider using a non-waiting finder.
See https://www.cloudbees.com/blog/faster-rails-tests
# ./spec/support/shared_examples/features/discussion_comments_shared_example.rb:26:in `block (2 levels) in <main>'
# ./spec/spec_helper.rb:413:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:18:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:405:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:401:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:59:in `with_raw_context'
# ./spec/spec_helper.rb:401:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:241:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7: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>'
Screenshot
The test failed because an assertion was made before waiting for "My comment"
to appear in the UI. Instead, it uses a thread that is above that comment in the assertion.
Steps to reproduce
bundle exec rspec 'spec/features/discussion_comments/commit_spec.rb[1:1:1]'
Proposed Resolution
Please refer to the Resolution guidance to learn more about resolution of broken master.
Edited by Nao Hashizume