Skip to content

Add unit tests for blocking pool filter, fix doc inconsistencies#4

Merged
cong-or merged 1 commit intocong-or:mainfrom
TickTockBent:test/blocking-pool-and-docs
Mar 18, 2026
Merged

Add unit tests for blocking pool filter, fix doc inconsistencies#4
cong-or merged 1 commit intocong-or:mainfrom
TickTockBent:test/blocking-pool-and-docs

Conversation

@TickTockBent
Copy link
Contributor

What

Adds 9 unit tests for is_blocking_pool_stack() and fixes a couple doc inconsistencies I noticed while reading through the codebase.

Tests

The blocking pool filter went through four release iterations (v0.4.2 through v0.5.0) to get right, but had no test coverage. These tests pin down the current behavior:

  • Genuine spawn_blocking stacks (with Inner::run, without worker scheduler) are filtered
  • Genuine worker stacks (with both markers) pass through
  • Unrelated stacks, empty stacks, partial marker stacks all pass through
  • starts_with and contains matching work correctly for closure wrappers and different Tokio versions
  • Two realistic deep-stack scenarios (sync I/O via spawn_blocking, bcrypt on a worker thread)

All 64 tests pass, clippy clean, fmt clean.

Doc fixes

TROUBLESHOOTING.md: The "Workers: 0" section listed 3 discovery steps but the code and ARCHITECTURE.md document 4 (the explicit --workers prefix step was missing). Updated to match.

README.md: Requirements listed "x86_64 architecture" but ARCHITECTURE.md and DEVELOPMENT.md both say x86_64/aarch64. Updated to match.

// ticktockbent

Add 9 unit tests for `is_blocking_pool_stack()` covering the blocking
pool detection logic from issue cong-or#3. This function went through multiple
release iterations (v0.4.2–v0.5.0) but had zero test coverage.

Fix TROUBLESHOOTING.md listing 3 worker discovery steps when the actual
implementation and ARCHITECTURE.md document 4. Fix README.md stating
"x86_64 architecture" when ARCHITECTURE.md and DEVELOPMENT.md both
document x86_64/aarch64 support.

// ticktockbent
@cong-or
Copy link
Owner

cong-or commented Mar 18, 2026

Thanks @TickTockBent , really appreciate the contribution!

@cong-or cong-or merged commit 44773b2 into cong-or:main Mar 18, 2026
4 checks passed
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.

2 participants