Skip to content

test: let the restarted silent-stream log end before stopping it - #1112

Merged
vdusek merged 1 commit into
masterfrom
test/flaky-silent-stream-restart
Oct 10, 2026
Merged

vdusek merged 1 commit into
masterfrom
test/flaky-silent-stream-restart

Conversation

@vdusek

@vdusek vdusek commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

test_streamed_log_sync_stop_returns_on_silent_stream restarts the log and calls stop() right away. When stop() lands before the restarted stream delivers its line, the thread falls back to reading the whole log, which the test doesn't serve. The 500 then goes through the client's retry backoff for longer than the 5 s join, and the final Log redirection stopped due to unexpected error record shows up in the caplog of a later test on the same xdist worker (failed run).

The test now waits for the restarted thread to finish on its own (the released server ends the stream after one line), asserts that it did, and only then calls stop(). Running the two tests back to back failed 12/12 before the change and passes after it.

✍️ Drafted by Claude Code

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Oct 9, 2026
@vdusek vdusek self-assigned this Oct 9, 2026
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.50%. Comparing base (a370e7a) to head (055e568).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1112      +/-   ##
==========================================
- Coverage   95.53%   95.50%   -0.04%     
==========================================
  Files          61       61              
  Lines        5935     5935              
==========================================
- Hits         5670     5668       -2     
- Misses        265      267       +2     
Flag Coverage Δ
integration 90.85% <ø> (+0.26%) ⬆️
unit 88.91% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek changed the title test(log): let the restarted silent-stream log end before stopping it test: let the restarted silent-stream log end before stopping it Oct 9, 2026
@vdusek
vdusek marked this pull request as ready for review October 9, 2026 14:47
@vdusek
vdusek requested a review from Mantisus October 9, 2026 14:47
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 9, 2026

@Mantisus Mantisus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@apify-approval-mirror apify-approval-mirror Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mirroring approval from @Mantisus.

@vdusek
vdusek merged commit 5f2b169 into master Oct 10, 2026
31 of 36 checks passed
@vdusek
vdusek deleted the test/flaky-silent-stream-restart branch October 10, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants