Fix flaky jaeger test by fully closing managed channel to isolate tests#8322
Fix flaky jaeger test by fully closing managed channel to isolate tests#8322jack-berg merged 3 commits intoopen-telemetry:mainfrom
Conversation
| pollFuture.cancel(true); | ||
| pollExecutor.shutdownNow(); | ||
| grpcSender.shutdown(); | ||
| grpcSender.shutdown().join(10, TimeUnit.SECONDS); |
There was a problem hiding this comment.
This is consistent with SpanExporter, MetricExporter, LogRecordExporter close implementation.
JaegerREmoteSamplerTest would be prone to the same test flake as JaegerRemoteSamplerGrpcNettyTest if it weren't for a bug in which the server called grpcErrors.peek() instead of poll(). This causes JaegerRemoteSamplerTest to avoid test flakes by ignoring the error queue and just returning the same error over and over.
I fixed the peek / poll but, but need to make sure shutdown is thorough to isolate test cases, else JaegerRemoteSamplerTest will start being flaky.
…y-java into jaeger-test-flake
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8322 +/- ##
=========================================
Coverage 90.27% 90.27%
Complexity 7695 7695
=========================================
Files 850 850
Lines 23207 23207
Branches 2356 2356
=========================================
Hits 20951 20951
Misses 1531 1531
Partials 725 725 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The JaegerRemoteSamplerGrpcNettyTest.unimplemented_error_server_response test fails 57% of the time: https://develocity.opentelemetry.io/scans/tests?search.timeZoneId=America%2FChicago&tests.container=io.opentelemetry.sdk.extension.trace.jaeger.sampler.JaegerRemoteSamplerGrpcNettyTest
Right now the theory is:
Solution is to try to isolate tests better by making sure requests from tests don't leak into each other. Accomplish this by a more thorough managed channel shutdown routine.