Skip to content

[codex] Stabilize metric offset exporter test#177

Merged
andrewh merged 1 commit into
mainfrom
codex/fix-issue-175-metric-offset-test
Jun 13, 2026
Merged

[codex] Stabilize metric offset exporter test#177
andrewh merged 1 commit into
mainfrom
codex/fix-issue-175-metric-offset-test

Conversation

@andrewh

@andrewh andrewh commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace the periodic reader timing path in TestTimeOffsetMetricExporterEndToEnd with a manual reader collection.
  • Export the collected metrics through NewTimeOffsetMetricExporter synchronously before asserting shifted timestamps.

Root cause

The test depended on NewPeriodicReader exporting on a background interval before the assertion loop observed requests.count, which made the test timing-sensitive.

Validation

  • go test ./pkg/synth -run TestTimeOffsetMetricExporterEndToEnd -count=100
  • make test
  • make lint

Fixes issue 175.

@andrewh
andrewh marked this pull request as ready for review June 13, 2026 11:10
@andrewh
andrewh force-pushed the codex/fix-issue-175-metric-offset-test branch from bf87f6c to 2200350 Compare June 13, 2026 11:16
@andrewh
andrewh merged commit 0e2427d into main Jun 13, 2026
2 checks passed
@andrewh
andrewh deleted the codex/fix-issue-175-metric-offset-test branch June 13, 2026 11:18
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.

1 participant