RSpec failure: spec/features/users/login_spec.rb
Summary
master broken incidents:
- gitlab-org/quality/engineering-productivity/master-broken-incidents#1256 (closed)
- gitlab-org/quality/engineering-productivity/master-broken-incidents#1257 (closed)
- gitlab-org/quality/engineering-productivity/master-broken-incidents#1258 (closed)
- gitlab-org/quality/engineering-productivity/master-broken-incidents#1259 (closed)
- gitlab-org/quality/engineering-productivity/master-broken-incidents#1260 (closed)
- gitlab-org/quality/engineering-productivity/master-broken-incidents#1261 (closed)
- gitlab-org/quality/engineering-productivity/master-broken-incidents#1262 (closed)
- gitlab-org/quality/engineering-productivity/master-broken-incidents#1263 (closed)
- gitlab-org/quality/engineering-productivity/master-broken-incidents#1264 (closed)
- gitlab-org/quality/engineering-productivity/master-broken-incidents#1265 (closed)
spec/features/users/login_spec.rb
Failures:
1) Login with two-factor authentication with valid username/password using one-time code allows login with valid code
Got 1 failure and 1 other error:
1.1) Failure/Error: expect(page).to have_current_path root_path, ignore_query: true
expected "/users/sign_in" to equal "/"
Timeout (45s) reached while running a waiting Capybara finder.
Consider using a non-waiting finder.
See https://www.cloudbees.com/blog/faster-rails-tests
# ./spec/features/users/login_spec.rb:332:in `block (5 levels) in <main>'
# ./spec/spec_helper.rb:464:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:18:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:456:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:452:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:61:in `with_raw_context'
# ./spec/spec_helper.rb:452:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:240:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <main>'
# ./spec/support/redis.rb:17:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:108:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:62:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:108:in `block (2 levels) in <main>'
Failed examples:
rspec ./spec/features/users/login_spec.rb:324
Another one reported in gitlab-org/quality/engineering-productivity/master-broken-incidents#1255 (closed):
Failures:
1) Login with two-factor authentication with valid username/password using one-time code triggers ActiveSession.cleanup for the user
Failure/Error:
expect(adapter.send(counter))
.to receive(:increment)
.exactly(@exactly || :once)
(Double "user_authenticated - Counter of successful authentication events").increment(*(any args))
expected: 1 time with any arguments
received: 0 times with any arguments
# ./spec/support/matchers/metric_counter_matcher.rb:5:in `block (2 levels) in <main>'
# ./spec/spec_helper.rb:464:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:18:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:456:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:452:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:61:in `with_raw_context'
# ./spec/spec_helper.rb:452:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:240:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <main>'
# ./spec/support/redis.rb:17:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:108:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:62:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:108:in `block (2 levels) in <main>'
Finished in 1 minute 45 seconds (files took 1 minute 10.54 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./spec/features/users/login_spec.rb:364 # Login with two-factor authentication with valid username/password using one-time code triggers ActiveSession.cleanup for the user
Listing both failures since they started appearing flaky around the same time today.
Steps to reproduce
Only reproduced in CI pipeline, I was not able to reproduce locally by running the test in isolation, with other specs in the same file, or with bisect
.
Update: the failures are now reproducible following this comment
Proposed Resolution
We have quarantined the two reported specs in Quarantine flaky user login spec (!115906 - merged), please still keep the issue to investigate the root cause of the spec failure so we can resume coverage soon.
Edited by Jennifer Li