Rspec failure: spec/lib/gitlab/usage/metrics/instrumentations/database_metric_spec.rb
Job #1870313577 failed for 33ceed91:
Failures:
1) Gitlab::Usage::Metrics::Instrumentations::DatabaseMetric#value with estimate_batch_distinct_count calculates a correct result
Failure/Error: expect(subject.value).to be_within(Gitlab::Database::PostgresHll::BatchDistinctCounter::ERROR_RATE).percent_of(3)
expected 2.0809220082170614 to be within 4.9% of 3
# ./spec/lib/gitlab/usage/metrics/instrumentations/database_metric_spec.rb:86: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 29 minutes 18 seconds (files took 59.11 seconds to load)
3991 examples, 1 failure, 4 pending
Failed examples:
rspec ./spec/lib/gitlab/usage/metrics/instrumentations/database_metric_spec.rb:85 # Gitlab::Usage::Metrics::Instrumentations::DatabaseMetric#value with estimate_batch_distinct_count calculates a correct result