Skip to content

test(util): Replace Thread.sleep with latch in ExecCallbacksTest - #4969

Merged
kubernetes-prow[bot] merged 1 commit into
kubernetes-client:masterfrom
flrnd:replace-sleep-with-latch-in-exec-callbacks-test
Nov 9, 2026
Merged

kubernetes-prow[bot] merged 1 commit into
kubernetes-client:masterfrom
flrnd:replace-sleep-with-latch-in-exec-callbacks-test

Conversation

@flrnd

@flrnd flrnd commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Replace the 30-second Thread.sleep() in ExecCallbacksTest.maxTimeout() with a CountDownLatch.

This preserves the timeout behavior while allowing the background callback to be released in a finally block instead of continuing to sleep after the test completes.

Testing

  • Test suite passed locally.

Refs #1223

@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 30, 2026
Replaces the arbitrary 30-second sleep with a latch, preserving timeout behavior while allowing the background callback to be released when the test finishes.
@flrnd
flrnd force-pushed the replace-sleep-with-latch-in-exec-callbacks-test branch from f6c4d2d to 8b949ef Compare November 3, 2026 19:46
@kubernetes-prow kubernetes-prow Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 3, 2026
@brendandburns

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 9, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, flrnd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2026
@kubernetes-prow
kubernetes-prow Bot merged commit 73a7948 into kubernetes-client:master Nov 9, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants