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.
This test is flaky as written because we repeat until the
acquire
workflow has completed for the first ten items in the pool as a way of waiting for the pool to be fully initialized. However, an item can be acquired momentarily before it is added to the queue of items to be taken from the pool. So it is possible that:get
are executed, causing new items to be acquired because the original one failsWe could add further coordination to prevent this from occurring but I don't think this is a problem. The pool is correct to allocate a new item once one of the calls to
get
returns a failure and I don't think there is any guarantee that an in process item from initialization must be returned by the pool before an item allocated after failure of an entry.