DataDog / datadog-ci-rb

Ruby library for Datadog test visibility
https://docs.datadoghq.com/continuous_integration/tests/ruby
Other
8 stars 4 forks source link

[SDTEST-482] Use correct monotonic clock time if Timecop.mock_process_clock is set #242

Closed anmarchenko closed 1 week ago

anmarchenko commented 1 month ago

What does this PR do? Automatically configures correct monotonic clock provider for tracing module if timecop library mocked monotonic time.

Motivation Timecop v0.9.9 allows to mock monotonic clock, which might affect displayed tests duration in Datadog UI.

How to test the change? Unit test is provided

codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.

Project coverage is 98.78%. Comparing base (fc40f77) to head (1ef2028).

Files with missing lines Patch % Lines
lib/datadog/ci/configuration/components.rb 70.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #242 +/- ## ========================================== - Coverage 98.80% 98.78% -0.02% ========================================== Files 285 285 Lines 13757 13766 +9 Branches 655 656 +1 ========================================== + Hits 13592 13599 +7 - Misses 165 167 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.