-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[connector/spanmetrics] Fix flaky spanmetricsconnector test that reli…
…es on timing (#33443) **Description:** <Describe what has changed.> Tries fixing some flaky unit tests that relied on `time.Now()` always returning a higher value than the previous call The solution is reading the current time from a `clock.Clock` interface. The test relying on ever-increasing `Now()` values uses a mock that always returns an increasing value. **Link to tracking Issue:** #33438 **Testing:** - Ran the component locally to verify the ticker still flushes after the configured duration passes Closes #33438
- Loading branch information
Showing
3 changed files
with
59 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters