opentelemetry-java icon indicating copy to clipboard operation
opentelemetry-java copied to clipboard

Increase HTTP connectTimeout test threshold to match gRPC

Open thswlsqls opened this issue 5 months ago • 1 comments

Description

  • AbstractHttpTelemetryExporterTest.connectTimeout() asserts the failed export returns in <1s. That is flaky: connection failures to a non-routable IP take 1-5s depending on OS/network.
  • The sibling gRPC base AbstractGrpcTelemetryExporterTest was already relaxed <1s→<6s in PR #7840, but the HTTP base was missed — an incomplete fix.
  • This mirrors that change with the same comment. Intent is unchanged — the export must still fail well before the default 10s connect timeout.
  • Related: PR #7840 (commit 92d23b2b2), issue #7827.

Testing done

  • No new test — this is a test-only change to the shared abstract base; the assertion itself is the test.
  • ./gradlew :exporters:otlp:testing-internal:check passed (module has no own tests).
  • ./gradlew :exporters:otlp:all:testOkHttpVersionLATEST :exporters:otlp:all:testJdkHttpSender passed; all six connectTimeout() cases (span/metric/log × OkHttp/JdkSender) green.
  • No public API change (internal test package); no CHANGELOG, no apidiff.

thswlsqls avatar Jun 21 '26 00:06 thswlsqls

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 78.77%. Comparing base (824334c) to head (06a8268). :warning: Report is 42 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8494   +/-   ##
=========================================
  Coverage     78.77%   78.77%           
  Complexity     8579     8579           
=========================================
  Files          1009     1009           
  Lines         28993    28993           
  Branches       3599     3599           
=========================================
  Hits          22839    22839           
  Misses         5311     5311           
  Partials        843      843           

:umbrella: View full report in Codecov by Harness.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jun 21 '26 00:06 codecov[bot]

Ready for review — CI is green.

thswlsqls avatar Jul 05 '26 05:07 thswlsqls

Thank you for your contribution @thswlsqls! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.

otelbot[bot] avatar Jul 13 '26 19:07 otelbot[bot]