Repository navigation
test(controller): make controller cost tests clock-independent on Windows - #408
Merged
Merged
Conversation
…dows Run both controller cost tests in a synctest bubble with a resource monitor that sleeps 1s per sample, so the first Step's measured wall time is set by the bubble clock instead of Windows' coarse timer. Process CPU is asserted non-decreasing / non-negative rather than nonzero. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GZgRs2crE1YQ1TT4kftix1
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
No related issue: fixes main's Windows go-quality lane broken by #403.
Summary
TestReconcilerPublishesPreviousTickCostfailed on main's Windows go-quality lane (run 36356368154):LastTickDurationSeconds:0. A fast fake Step measures 0 on Windows' coarse wall clock, so the test's nonzero assertions were timing-dependent. #403's own PR run passed the Windows lane by chance.Fix
synctest.Testwith aslowResourcesmonitor that sleeps 1s per sample. The bubble clock advances only on that sleep, so Step's measured duration is deterministic and the test asserts the persisted previous-tick value is at least 1s.GetProcessTimes, ~15.6 ms granularity) is asserted non-decreasing across Steps / non-negative, not nonzero.Verification
-test.run 'ControllerCost|PreviousTickCost' -test.count 20: 40/40 PASS.go build ./...,go test -race ./...,golangci-lint run ./...(v2.13.2, 0 issues),CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath ./cmd/...all pass.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01GZgRs2crE1YQ1TT4kftix1