opentelemetry-collector
opentelemetry-collector copied to clipboard
[builder] make retries configurable for faster tests
Description
When running tests, waiting for downloadModules() to fail 3 times when that's expected adds time to the test run. This updates tests to only attempt downloading once. Note: if there's a network failure that could cause downloadModules() to fail when it should normally succeed. Also the wording here is retries when in actuality it's the number of attempts. I didn't change this to keep the log wording the same, but I can change the wording if that's preferable.
Link to tracking issue
this will help for adding tests for https://github.com/open-telemetry/opentelemetry-collector/issues/9252 and https://github.com/open-telemetry/opentelemetry-collector/issues/9896
Testing
Tests ran
Codecov Report
Attention: Patch coverage is 71.42857% with 2 lines in your changes are missing coverage. Please review.
Project coverage is 91.87%. Comparing base (
326ef7c) to head (565a78c). Report is 17 commits behind head on main.
| Files | Patch % | Lines |
|---|---|---|
| cmd/builder/internal/builder/main.go | 33.33% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #10035 +/- ##
==========================================
+ Coverage 91.55% 91.87% +0.31%
==========================================
Files 360 360
Lines 16693 16728 +35
==========================================
+ Hits 15284 15369 +85
+ Misses 1073 1021 -52
- Partials 336 338 +2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.