test: add backpressure policy coverage - #71
Merged
Conversation
Add configure_depends to the test glob so new unit test sources are discovered without rerunning configuration and add a short guide describing the queue back-pressure macros and drop counter helpers.
Replace the MPSC block-path timeout with a true wait loop so producers no longer fall through to the drop counter when the ring stays full. Relax the drop assertions in the burst regression to require sustained pressure without assuming an exact discard budget.
Ensure cancelling slow-path requests keeps drop counters balanced and extend policy regression to catch mismatched drop totals.
Allow the single- and multi-producer helpers to hold the consumer gate for a deterministic delay and apply that hold to the drop policy runs so the queues saturate reliably.
Allow a small tolerance when asserting the block-policy publish duration so the macOS TSAN job accounts for scheduler jitter.
Describe the mandatory git submodule update step so TimeShield and other embedded dependencies are available before running tests.
Ensure the lock-free executor removes one queued task when DropOldest\ntriggers, reinitialise the ring after max-size updates, and make the block\npolicy gating more resilient.
Delay MPSC publishers whenever the active task count reaches the configured queue limit and wake them as workers finish so the block policy provides real back-pressure instead of draining immediately on macOS.
Ensure the MPSC TaskExecutor removes overflowed work only from the worker thread and wakes blocked producers when capacity frees up, restoring deterministic ordering under DropOldest.
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
Testing
https://chatgpt.com/codex/tasks/task_e_68ca24ff365c832c85510ad9209d0e17