Skip to content

tests: poll for batch flush instead of fixed sleep#1527

Merged
jpnurmi merged 3 commits intomasterfrom
jpnurmi/test/sleep-logs-metrics
Feb 18, 2026
Merged

tests: poll for batch flush instead of fixed sleep#1527
jpnurmi merged 3 commits intomasterfrom
jpnurmi/test/sleep-logs-metrics

Conversation

@jpnurmi
Copy link
Collaborator

@jpnurmi jpnurmi commented Feb 17, 2026

Replace fixed sleep_ms(20) with a polling loop (up to 5s) that exits as soon as the flush completes. Fixes flaky basic_logging_functionality and metrics_batch tests on CI under CPU pressure where the batcher thread may not get scheduled quickly enough.

Verified locally with stress + taskset pinned to a single core (100 iterations, 0 failures).

Fixes #1525

Replace fixed `sleep_ms(20)` with a polling loop (up to 5s) that exits
as soon as the flush completes. Fixes flaky `basic_logging_functionality`
and `metrics_batch` tests in the CI under CPU pressure where the batcher
thread may not get scheduled quickly enough (#1525).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

jpnurmi and others added 2 commits February 17, 2026 17:58
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jpnurmi jpnurmi merged commit 4740a9a into master Feb 18, 2026
67 of 77 checks passed
@jpnurmi jpnurmi deleted the jpnurmi/test/sleep-logs-metrics branch February 18, 2026 09:54
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.

Flaky test: basic_logging_functionality

2 participants