Closed anmarchenko closed 4 months ago
Fun fact: it broke my tests that use Timecop as well! this means it works
Attention: Patch coverage is 97.05882%
with 1 lines
in your changes are missing coverage. Please review.
Project coverage is 98.93%. Comparing base (
cbf442b
) to head (4fa4efb
).
Files | Patch % | Lines |
---|---|---|
lib/datadog/ci/configuration/components.rb | 83.33% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
What does this PR do? timecop is a popular gem that is used to mock time in tests. It works by replacing Time.now method and aliasing the original as
now_without_mock_time
.This creates issues with tests tracing as reported spans has invalid time and thus are being skipped or reported with wrong timestamps.
It is possible to setup time_now_provider in settings: we can do this automatically when activating CI mode so that no manual work from user's side is needed.
Motivation We received multiple customer support issues related to invalid start_time.
How to test the change? Unit tests are provided (with timecop dependency).