sangkyoonnam opened a new pull request, #29534:
URL: https://github.com/apache/flink/pull/29534
## What is the purpose of the change
`OpenTelemetryMetricReporterITCase.testCounterDelta` intermittently fails
with `expected: 1234 but was: 25`. The reporter exports counter deltas, so the
second report after `counter.inc(25)` contains 25, but the second check still
expects 1234.
`eventuallyConsumeJson` checks the last line of the collector's output file,
and export completion does not guarantee that the collector has flushed the
second report to that file. The wrong expectation can therefore pass by reading
the first report. If the second report is already visible, the check keeps
failing until the two-minute timeout. Expecting 25 makes the check wait for the
second report.
## Brief change log
- The second check in `testCounterDelta` expects the delta of the second
report, 25.
## Verifying this change
Verified on master at `77c3daea10d` with JDK 17. With a temporary 5 s delay
before the second check, the original assertion failed after 126.9 s with
`expected: 1234 but was: 25`; the corrected assertion passed under the same
condition. The delay is not included in this PR. `./mvnw -pl
flink-metrics/flink-metrics-otel clean verify` passes.
Without the delay, `OpenTelemetryMetricReporterITCase` passed in seven of
eight runs. One run timed out in the first check while reading empty collector
output, before reaching the modified assertion; this change does not address
that failure.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code 2.1.303 (Claude Opus 5.5)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]