Skip to content

Fix flaky CI builds count metric test

Stan Hu requested to merge sh-fix-flaky-ci-builds-spec into master

What does this MR do and why?

ee/spec/lib/gitlab/usage/metrics/instrumentations/count_ci_builds_metric_spec.rb failed in https://gitlab.com/gitlab-org/gitlab/-/jobs/3501524441 for a similar issue to !107159 (merged)

The test was trying to scan for builds created between 2 days ago and 30 days ago. However, due to timestamp precision it was likely that the build created 30 days ago would be included. To eliminate any chance of this test failing, just move the creation timestamp by a day.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports