Skip to content

testbed: use fluent assertThat and remove stale nanos TODO#8607

Merged
jack-berg merged 2 commits into
open-telemetry:mainfrom
fossadvocate86:fossadvocate86/fix-assertSameTrace-todo
Jul 16, 2026
Merged

testbed: use fluent assertThat and remove stale nanos TODO#8607
jack-berg merged 2 commits into
open-telemetry:mainfrom
fossadvocate86:fossadvocate86/fix-assertSameTrace-todo

Conversation

@fossadvocate86

Copy link
Copy Markdown
Contributor

Two TestUtils.assertSameTrace() methods in the sdk/trace and opentracing-shim
testbeds carry a TODO - Include nanos in this comparison. that has been stale since
the API was migrated to return epoch nanoseconds directly via getEndEpochNanos().

sdk/trace testbed

Replace assertThat(a >= b).isTrue() with assertThat(a).isGreaterThanOrEqualTo(b)
and remove the TODO comment.

The old form fails with expected: true, but was: false — no diagnostic information.
The new fluent form reports the actual nanosecond values on failure, making it
immediately actionable.

opentracing-shim testbed

Already used the fluent form (.isLessThanOrEqualTo). Remove the now-stale TODO
comment.

Testing

  • LateSpanFinishTest (sdk/trace) — the sole caller of the sdk/trace version ✅
  • LateSpanFinishTest (opentracing-shim) ✅
  • OpenTelemetryInteroperabilityTest (opentracing-shim) — 2 tests that call assertSameTrace

@fossadvocate86 fossadvocate86 requested a review from a team as a code owner July 16, 2026 18:04
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 16, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: fossadvocate86 / name: fossadvocate86 (7762b98)

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.63%. Comparing base (c12e11b) to head (6d0c9c5).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8607   +/-   ##
=========================================
  Coverage     91.63%   91.63%           
- Complexity    10326    10327    +1     
=========================================
  Files          1013     1013           
  Lines         27295    27295           
  Branches       3205     3205           
=========================================
+ Hits          25011    25012    +1     
  Misses         1558     1558           
+ Partials        726      725    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@fossadvocate86

Copy link
Copy Markdown
Contributor Author

/easycla

@fossadvocate86 fossadvocate86 force-pushed the fossadvocate86/fix-assertSameTrace-todo branch from 299333a to 7762b98 Compare July 16, 2026 18:47
@jack-berg jack-berg merged commit 63ebd94 into open-telemetry:main Jul 16, 2026
29 checks passed
@otelbot

otelbot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants