test(pool): cover cancellation during bounded acquisition - #286
Merged
Conversation
Signed-off-by: QwQBiG <baigaozi114514@gmail.com>
Contributor
Author
|
This is a non-blocking, test-only follow-up and can wait until after the 0.7.2 release. |
Member
Need not to wait for release. I generally consider our release model as a release train model where if a release failed, we start a new release from the new latest commit. |
Contributor
Author
Got it~ Thanks for the clarification and the merge~ |
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
Motivated by reviewing OpenDAL's proposed Asyncband migration in apache/opendal#8219. Its Memcached connection acquisition races
pool.get()against a ten-second timeout, so an unfinished acquisition can be cancelled.Add bounded pool tests for cancellation:
These complement the existing recycling and replenishment cancellation tests by checking acquisition cancellation through the public pool API. They verify waiter progress, capacity recovery, and object reuse.
The tests use controlled polling without network calls or wall-clock timeouts. They check wake-driven progress without requiring FIFO notification order. Production code is unchanged; this is coverage for the existing cancellation contract, not a fix for an observed downstream failure.
Validation
cargo x test: 476 tests and doctests passed.Validation was performed locally in my WSL Linux.