Commit ed6c5640 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch '281063-fix-flaky-audit-preloader-test' into 'master'

Fix flaky test due to non-deterministic ordering of audit_events

See merge request gitlab-org/gitlab!47363
parents b607ae11 2bf26b81
......@@ -3,7 +3,12 @@
require 'spec_helper'
RSpec.describe Gitlab::Audit::Events::Preloader do
let_it_be(:audit_events) { create_list(:audit_event, 2) }
let_it_be(:audit_events) do
[
create(:audit_event, created_at: 2.days.ago),
create(:audit_event, created_at: 1.day.ago)
]
end
let(:audit_events_relation) { AuditEvent.where(id: audit_events.map(&:id)) }
describe '.preload!' 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