test: resolve flaky integration test timing issues#3503
Merged
tippmar-nr merged 3 commits intomainfrom Mar 24, 2026
Merged
Conversation
- GCSamplerV2 tests: add Gen0-only GC.Collect(0) calls so the V2 per-generation subtraction logic reliably reports non-zero Gen0 collections regardless of startup timing. - OTel metrics tests: wait for the OTLP export log line (fires every 5s) instead of analytic_event_data (fires at ~60s), which races with the 60-second WaitForLogLine timeout on slow CI machines. - OTel stress tests: replace the 60s analytics wait + 45s Thread.Sleep with a wait for 3 OTLP exports (~15s), cutting exercise time from ~123s to ~20s. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
nrcventura
approved these changes
Mar 24, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3503 +/- ##
==========================================
+ Coverage 81.78% 81.82% +0.03%
==========================================
Files 508 508
Lines 34220 34220
Branches 4040 4040
==========================================
+ Hits 27986 27999 +13
+ Misses 5268 5254 -14
- Partials 966 967 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GC.Collect(0)calls so V2 per-generation subtraction reliably reports non-zero Gen0 collections on fast-starting CI processes.analytic_event_data(every 60s), eliminating a timeout race.Thread.Sleepwith a wait for 3 OTLP exports, cutting exercise time from ~123s to ~20s.Test plan
OpenTelemetryMetricsTestssuite — all variants should pass without 60s timeout flakinessOpenTelemetryStressTestssuite — should complete in ~30s instead of ~2.5minAgentMetricssuite — GCSamplerV2 tests should pass consistently🤖 Generated with Claude Code