chore(ci): mock now function for rate limiter in tests to make them deterministic#1842
Conversation
Clippy Allow Annotation ReportComparing clippy allow annotations between branches:
Summary by Rule
Annotation Counts by File
Annotation Stats by Crate
About This ReportThis report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality. |
bwoebi
left a comment
There was a problem hiding this comment.
Oh! #[cfg(test)] is such an obvious solution that I just did not think of that.
I was expecting to have to patch gettimeofday from libc or something.
Thanks!
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1842 +/- ##
==========================================
+ Coverage 71.53% 71.58% +0.05%
==========================================
Files 426 426
Lines 67289 67302 +13
==========================================
+ Hits 48134 48177 +43
+ Misses 19155 19125 -30
🚀 New features to boost your workflow:
|
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 5d1f5f8 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
# Release proposal for libdd-capabilities-impl and its dependencies This PR contains version bumps based on public API changes and commits since last release. ## libdd-capabilities **Next version:** `1.0.0` **Semver bump:** `major` **Tag:** `libdd-capabilities-v1.0.0` **Warning:** this is an initial release. Please verify that the version and commits included are correct. ## libdd-common **Next version:** `4.0.0` **Semver bump:** `major` **Tag:** `libdd-common-v4.0.0` ### Commits - chore(benchmarks): add allocation size tracking allocator (#1905) - refactor(libdd-capabilities)!: remove transitive dependency (#1895) - feat(runtime)!: add shared runtime (#1602) - fix(crypto): use `ring` for non-fips builds (#1816) - fix(ci): skip thread counting test (#1841) - chore(ci): mock now function for rate limiter in tests to make them deterministic (#1842) - fix(entity_id): Handle Podman cgroupns=host cgroup path (#1828) - feat(capabilities)!: trait architecture http (#1555) - feat!: implement HTTP common component (#1624) - fix(common): don't use reqwest http proxies (#1810) - test(miri): skip reqwest test that takes 10mn (#1784) ## libdd-capabilities-impl **Next version:** `1.0.0` **Semver bump:** `major` **Tag:** `libdd-capabilities-impl-v1.0.0` **Warning:** this is an initial release. Please verify that the version and commits included are correct. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: hoolioh <107922352+hoolioh@users.noreply.github.com>
# Release proposal for libdd-capabilities-impl and its dependencies This PR contains version bumps based on public API changes and commits since last release. ## libdd-capabilities **Next version:** `1.0.0` **Semver bump:** `major` **Tag:** `libdd-capabilities-v1.0.0` **Warning:** this is an initial release. Please verify that the version and commits included are correct. ## libdd-common **Next version:** `4.0.0` **Semver bump:** `major` **Tag:** `libdd-common-v4.0.0` ### Commits - fix(libdd-common): fix condition so testing with --all-features works (#1919) - chore(benchmarks): add allocation size tracking allocator (#1905) - refactor(libdd-capabilities)!: remove transitive dependency (#1895) - feat(runtime)!: add shared runtime (#1602) - fix(crypto): use `ring` for non-fips builds (#1816) - fix(ci): skip thread counting test (#1841) - chore(ci): mock now function for rate limiter in tests to make them deterministic (#1842) - fix(entity_id): Handle Podman cgroupns=host cgroup path (#1828) - feat(capabilities)!: trait architecture http (#1555) - feat!: implement HTTP common component (#1624) - fix(common): don't use reqwest http proxies (#1810) - test(miri): skip reqwest test that takes 10mn (#1784) ## libdd-capabilities-impl **Next version:** `1.0.0` **Semver bump:** `major` **Tag:** `libdd-capabilities-impl-v1.0.0` **Warning:** this is an initial release. Please verify that the version and commits included are correct. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: hoolioh <107922352+hoolioh@users.noreply.github.com>

What does this PR do?
Makes the rate_limiter tests deterministic by mocking
now().Motivation
flakiness
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.