refactor(queue/mysql): event-driven integration tests, zero sleeps#132
Merged
Conversation
This was referenced Mar 9, 2026
024f610 to
cedec95
Compare
sbalabanov
approved these changes
Mar 9, 2026
cedec95 to
75c37e6
Compare
a810586 to
5f17ac0
Compare
5f17ac0 to
f180cec
Compare
75c37e6 to
8050a39
Compare
f180cec to
7ea8ef3
Compare
8050a39 to
159dc03
Compare
159dc03 to
5932823
Compare
…n tests Replace 13 time.Sleep, 8 require.Eventually, and ad-hoc time.After assertions with event-driven hooks. Add OnSignal channel to subscriber with typed HookSignal values (SignalDeliveryCheck, SignalPartitionUpdate) named after behavioral concerns rather than implementation details. Test helpers (waitForSignal, assertNoDelivery, waitForCondition) use the signal channel with a 10s safety-net timeout. Zero sleeps remain in test bodies.
5932823 to
dbcad5a
Compare
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
OnSignal chan HookSignalto subscriber with two behavioral signals (SignalDeliveryCheck,SignalPartitionUpdate) for event-driven test waitstime.Sleep, 8require.Eventually, and 6 inlinetime.Afterassertions from integration testswaitForSignal,assertNoDelivery,waitForConditiontestSubConfigwith short lease/visibility timeouts (3s/2s vs 30s/60s defaults) for fast crash recovery testsTest plan
make integration-test— all 6 suites passgrep -rn 'time.Sleep' test/integration/extension/queue/— zero occurrencesgrep -rn 'require.Eventually' test/integration/extension/queue/— zero occurrencestime.Afteronly inside helper functions as safety-net deadlocksTest Plan
Issues