Flaky test in spec/lib/gitlab/pagination/offset_header_builder_with_controller_spec.rb
https://gitlab.com/gitlab-org/gitlab/-/jobs/1181615462 failed with (retry solved the problem), I see same error on https://gitlab.com/gitlab-org/gitlab/-/jobs/1179363919.
Failures:
1) Gitlab::Pagination::OffsetHeaderBuilder pagination returns correct result for the first page
Failure/Error: expect(json_response).to eq([projects.first.id])
expected: [1004]
got: [1005]
(compared using ==)
# ./spec/lib/gitlab/pagination/offset_header_builder_with_controller_spec.rb:31:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:361:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:352:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:348:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:31:in `with_raw_context'
# ./spec/spec_helper.rb:348:in `block (2 levels) in <top (required)>'
2) Gitlab::Pagination::OffsetHeaderBuilder pagination returns correct result for the second page
Failure/Error: expect(json_response).to eq([projects.last.id])
expected: [1005]
got: [1004]
(compared using ==)
# ./spec/lib/gitlab/pagination/offset_header_builder_with_controller_spec.rb:37:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:361:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:352:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:348:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:31:in `with_raw_context'
# ./spec/spec_helper.rb:348:in `block (2 levels) in <top (required)>'
Finished in 17 minutes 30 seconds (files took 59.17 seconds to load)
3575 examples, 2 failures, 12 pending
Failed examples:
rspec ./spec/lib/gitlab/pagination/offset_header_builder_with_controller_spec.rb:28 # Gitlab::Pagination::OffsetHeaderBuilder pagination returns correct result for the first page
Edited by Jan Provaznik