bug: Fixes some correctness bug with ContextWatchdog#1688
Merged
SpencerTorres merged 4 commits intomainfrom Oct 22, 2025
Merged
bug: Fixes some correctness bug with ContextWatchdog#1688SpencerTorres merged 4 commits intomainfrom
SpencerTorres merged 4 commits intomainfrom
Conversation
1. We don't need infinite for loop to call the callback once context timeout 2. Currently callback will be called multiple times even after context is cancelled. This PR fixes and block the behavior with tests to make sure callback is called only once. 3. Make sure the goroutine started by watchdog exits at all cases without any leaking Signed-off-by: Kaviraj <[email protected]>
Signed-off-by: Kaviraj <[email protected]>
As synctest is not part of standard library (without EXPERIMENT flags). The tests would even fail during build. Hence the build tags Signed-off-by: Kaviraj <[email protected]>
Signed-off-by: Kaviraj <[email protected]>
kavirajk
commented
Oct 16, 2025
| @@ -0,0 +1,89 @@ | |||
| //go:build go1.25 | |||
Contributor
Author
There was a problem hiding this comment.
Can we removed once we upgrade the Go tool chain to v1.25.
#1689
SpencerTorres
approved these changes
Oct 22, 2025
Member
SpencerTorres
left a comment
There was a problem hiding this comment.
Glad this has test coverage 👌
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
Checklist
Delete items not relevant to your PR: