Skip to content

test(blockingpool): cover the generic pool - #3611

Draft
gmelodie wants to merge 1 commit into
masterfrom
chore/blockingpool-tests-for-the-generic-pool
Draft

gmelodie wants to merge 1 commit into
masterfrom
chore/blockingpool-tests-for-the-generic-pool

Conversation

@gmelodie

@gmelodie gmelodie commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

PR #3500 moved BlockingPool out of SystemResolver, but only the resolver tests cover it. A pool bug in cancel, stop or spawn failure then shows up as a resolver failure, or not at all. This PR adds tests/libp2p/utils/test_blockingpool.nim, which tests the pool directly with a work proc that holds a worker until the test releases it.
A worker spawn cannot fail on demand, so blockingpool.nim gets a failSpawnAt hook that raises ResourceExhaustedError. The hook exists only under libp2p_testing, so the library API does not change.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant