Repository navigation
test(providerio): widen the idle window in the content-reset test - #1172
Open
ShryukGrandhi wants to merge 1 commit into
Open
ShryukGrandhi wants to merge 1 commit into
ShryukGrandhi wants to merge 1 commit into
Conversation
TestScanSSEDataWithContextContentResetsOnData wrote a data line every 30ms against a 100ms idle timeout, so a ~70ms scheduling stall on a shared runner tripped the idle watchdog. Use a 500ms idle timeout (600ms content window) and 25 writes (~750ms), which keeps every gap far under the idle timeout while the run still outlasts the content window. Signed-off-by: ShryukGrandhi <85529990+ShryukGrandhi@users.noreply.github.com>
Vasanthdev2004
approved these changes
Oct 22, 2026
Vasanthdev2004
left a comment
Collaborator
There was a problem hiding this comment.
Approving. This is the scaling from #1140, and the numbers hold: each 30 ms gap sits far under the 500 ms idle timeout, and 25 writes still outlast the 600 ms content window, so the content watchdog is still exercised.
Checked on Windows at 795d873:
- the test passes 5 of 5;
- with
resetContent()taken out of the data path it fails with "stream stalled", so it still tests what it names; - with a 120 ms pause injected mid-stream it passes at 500 ms, and at the old 100 ms it fails with the same "idle timeout" error the macOS run hit.
I also approved the CI runs for the fork.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TestScanSSEDataWithContextContentResetsOnDataflaked once onSmoke (macos-latest). It wrote a data line every 30 ms against a 100 ms idle timeout, which leaves about 70 ms of slack per gap. One scheduling stall that long on a shared runner is enough to fire the idle watchdog.This change scales the timing as suggested on the issue:
ContentStallTimeout, 1.2x) is 600 msncheck moves from 10 to 25Each gap now has about 470 ms of slack, and the test still finishes in under a second. Only the test changes.
Linked issue
Fixes #1140
Testing
All on macOS arm64 with go1.26.9:
-test.cpu 1, the old test failed 37 of 200 runs withidle timeout (upstream stopped sending data).resetContent()temporarily removed from the data path, the new test fails withstream stalled (upstream kept the connection alive but produced no output).make fmt-check,go vet ./...,go test -race ./internal/providers/providerio/,go run ./cmd/zero-release build,go run ./cmd/zero-release smoke, andgit diff HEAD --checkpass.go test ./...: three failures outside this package.internal/sandboxTestPermissionProfileDropsAutomaticMasksCoveredByUserDenyandinternal/tuiTestRelativeAgeFormatsLastActivityalso fail on unmodifiedmainin my environment (the sandbox one depends onGH_CONFIG_DIR, the tui one on today's date).internal/configTestLoadProviderCommandSuccesshit its 5 s timeout during the full run and passes on its own.make lint-staticreports four existing findings in other files.make vulncheckreports GO-2026-6809 in the go1.26.9 standard library (fixed in go1.26.10). Neither is related to this change.Checklist
issue-approvedlabel.go build ./...,go vet ./..., andgo test ./...pass locally (apart from the three unrelated failures above).gofmtclean.-racewhere relevant).Summary by CodeRabbit