Skip to content

fix flaky continueParsing strand test baseline - #18694

Merged
kevinushey merged 1 commit into
mainfrom
test/18634-continueparsing-test-flake
Aug 31, 2026
Merged

kevinushey merged 1 commit into
mainfrom
test/18634-continueparsing-test-flake

Conversation

@kevinushey

Copy link
Copy Markdown
Collaborator

Summary

AsyncConnectionImpl.ContinueParsingResumesOnTheConnectionsStrand fails intermittently in rstudio-core-tests, asserting handlerCalls == 1 when it is 0.

The baseline phase of the test drained the io_context with a single non-blocking ioc.poll() right after startReading(). The request bytes written to peer still have to traverse the loopback socket before the connection's async_read can complete, so when they had not landed yet, poll() ran nothing and the handler never fired. The failure needs the sibling tests in the suite to run first (the timing shift they introduce); the test in isolation always passed.

The baseline now waits with a bounded ioc.run_for(30s) instead. readSome() initiates its read inline, so the io_context always has outstanding work until the handler chain drains -- run_for() returns as soon as the handler has run, and the deadline is only a hang cap. The second poll() after continueParsing() is left as-is: the strand post is immediately runnable with no I/O dependency, so it is deterministic.

Verification

On macOS arm64, looping --gtest_filter='AsyncConnectionImpl.*':

  • before: 15 failures in 15 runs
  • after: 0 failures in 30 runs

A full rstudio-core-tests run passes all 14 AsyncConnectionImpl tests. (ProcessTest.MultipleAsyncProcessesResults failed in that run, but it fails identically on an unmodified main build on the same machine, so it is unrelated.)

Fixes #18634.

https://claude.ai/code/session_017jMCCnK7Lza54inrLaQaJf

The baseline in ContinueParsingResumesOnTheConnectionsStrand drained the
io_context with a single non-blocking poll() right after startReading(),
but the request bytes written to the peer still have to traverse the
loopback socket -- when they had not landed yet, poll() ran nothing and
the assertion saw handlerCalls == 0. Wait with a bounded run_for()
instead: readSome() initiates its read inline, so the io_context always
has outstanding work until the handler chain drains, and the deadline is
only a hang cap.

Addresses #18634.

Claude-Session: https://claude.ai/code/session_017jMCCnK7Lza54inrLaQaJf
@github-actions

github-actions Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

#################### 100% pass rate

Passed Failed Skipped Flaky
2553 0 184 6
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 2 0 10 0
✅ desktop-linux 640 0 38 1
✅ desktop-macos 646 0 33 1
✅ desktop-windows 643 0 39 3
✅ server-linux 594 0 44 1
✅ setup 28 0 20 0
View / download the full report

View report online -- opens in the browser, no download needed. Available for 14 days.

Download playwright-report.zip -- extract and open index.html

Includes screenshots, traces, and step-by-step details for every test. Expires in 15 days.


All platforms - commit bf96ad1acb11d67f00a95dd5f8783a3bda4a1ad1 - Run #766

@kevinushey
kevinushey merged commit 8c59c31 into main Aug 31, 2026
51 of 52 checks passed
@kevinushey
kevinushey deleted the test/18634-continueparsing-test-flake branch August 31, 2026 22:40

This branch was previously deployed

1 inactive deployment
e2e-playwright — bf96ad1a Deployed Aug 31, 2026 by kevinushey via macos / e2e-desktop-macos (2) #766
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.

e2e flaky test: AsyncConnectionImpl.ContinueParsingResumesOnTheConnectionsStrand

1 participant