Repository navigation
test: characterize the Redis connection layer before v5 - #29
Merged
Merged
Conversation
Pin today's behavior in everything the v5 client-injection change touches.
Test-only; no src changes. Passes on ioredis 5/6 and redis 4/5/6.
Coverage audit (existing coverage kept as-is):
- Lua scripts: all 15 exercised end to end on both datastores.
- Error mapping (OVERWEIGHT, SETTINGS_KEY_NOT_FOUND, UNKNOWN_CLIENT):
covered.
- Pub/sub capacity / capacity-priority drains, publish/message: covered.
- Connection sharing, deleteKey / clusterKeys / auto-cleanup: covered.
- RESP2/RESP3 normalization, heartbeat / orphaned-jobs, clearDatastore:
covered.
Gaps filled. Preserve through v5:
- SCRIPT FLUSH mid-run: both datastores recover today.
- A disconnected limiter stops receiving messages while siblings on its
connection keep receiving and scheduling.
- Pub/sub-driven drains run outside the constructing caller's
AsyncLocalStorage context. Fails if RedisDatastore stops detaching
connection setup.
- Premade ioredis Cluster client: the old test never passed its connection
to the limiter. It now does and asserts a separate Cluster subscriber.
Gaps filled. Intentional v5 changes, edited when the behavior changes:
- limiter.disconnect() / group.disconnect() close connections they built;
a Group leaves a shared connection open.
- Errors from a Group-built connection reach group.on("error").
- A connection connects (node-redis), adds an error listener to, and sets
maxListeners on a passed-in client. ioredis also defines script methods
on it. disconnect() strips the consumer's error listeners and closes the
client.
makeConnection() with no options now builds a default connection for the
current datastore, so test bodies needn't change when construction does.
Owner
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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.

Pin today's behavior in everything the upcoming v5 client-injection change touches. Test-only; no src changes. Passes on ioredis 5/6 and redis 4/5/6.
Gaps filled. Preserve through v5:
connection setup.
Gaps filled. Intentional v5 changes, edited when the behavior changes:
makeConnection() with no options now builds a default connection for the current datastore, so test bodies needn't change when construction does.