Commit b45daa98 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'hchouraria-ci-charts-timezone-test-midnight-fix' into 'master'

Fix flaky test failure in charts_spec

See merge request gitlab-org/gitlab!54156
parents 266744a6 8b7cf773
......@@ -98,7 +98,12 @@ RSpec.describe Gitlab::Ci::Charts do
subject { chart.total }
before do
create(:ci_empty_pipeline, project: project, duration: 120)
# The created_at time used by the following execution
# can end up being after the creation of the 'today' time
# objects created above, and cause the queried counts to
# go to zero when the test executes close to midnight on the
# CI system, so we explicitly set it to a day earlier
create(:ci_empty_pipeline, project: project, duration: 120, created_at: today - 1.day)
end
it 'uses a utc time zone for range times' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment