-
Notifications
You must be signed in to change notification settings - Fork 40.7k
test: validate that watchers close without error #131505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
b35e574
to
c055de6
Compare
/assign @wojtek-t |
/cc @siyuanfoundation @serathius /triage accepted |
Blocking this on #131457, which covers closing response body a bit more cleanly and robustly. This can be rebased later to cover channel close and draining |
c055de6
to
2a05e10
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: karlkfi The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/remove-kind flake This doesn't fix flakes, but does identify one as TODO. |
- Add channel test helpers to k8s.io/client-go/util/testing - Use the new channel test helpers in the client and server watch tests to validate that the result channels closes without error when the client stops the watcher. - Use the new channel test helpers in the client watcher decoder tests to validate that encoded watch events can be decoded and that the decoder errors with EOF when stopped asynchronously. These new tests uncovered existing errors (added TODOs): 1. The watch client doesn't close the response body when it encounters a NegotiateError. 2. The watch client sometimes sends a decode error on the result channel after the client watcher has been stopped. 3. StreamWatcher.receive uses %v instead of %w when wrapping errors.
2a05e10
to
f17abda
Compare
tests passed. ready for review. |
@wojtek-t can you take a look at this? Do you need me to break it up? |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
These new tests uncovered existing errors (added TODOs):
Does this PR introduce a user-facing change?
Dependencies