test: fix flaky test by adding margin for time diff (#8121)

This commit is contained in:
Shivam Mishra 2023-10-17 14:20:40 +05:30 committed by GitHub
parent 3b0788c3be
commit e55fe33f1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ describe ReportingEventListener do
events = account.reporting_events.where(name: 'reply_time', conversation_id: message.conversation_id)
expect(events.length).to be 1
expect(events.first.value).to eq 7200
expect(events.first.value).to be_within(1).of(7200)
end
end