Skip to content

test(client): add hash field subkey notifications test#3264

Open
nkaradzhov wants to merge 2 commits into
redis:masterfrom
nkaradzhov:subkeyspace-notifications
Open

test(client): add hash field subkey notifications test#3264
nkaradzhov wants to merge 2 commits into
redis:masterfrom
nkaradzhov:subkeyspace-notifications

Conversation

@nkaradzhov
Copy link
Copy Markdown
Collaborator

@nkaradzhov nkaradzhov commented May 8, 2026

Verify that hash field expiration emits the expected subkey-level keyspace and keyevent notifications (hexpire/hexpired) on Redis 8.8+.

Description

Describe your pull request here


Checklist

  • Does npm test pass with this change (including linting)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

Note

Low Risk
Test-only changes that add a Redis 8.8+ PubSub/CONFIG-based integration test; minimal product risk, with the main risk being potential CI flakiness due to timing/event ordering.

Overview
Adds an integration test (Redis 8.8+ only) that verifies HPEXPIRE on a hash field emits the expected subkey-level keyspace/keyevent PubSub notifications (hexpire/hexpired) across the various __subkey*__ channels, temporarily toggling notify-keyspace-events and asserting received payloads.

Also tightens a few TypeScript expectations/types in the client tests (e.g., explicit @ts-expect-error, more specific RedisClientType generics, and a typed sinon.stub handle) without changing runtime behavior.

Reviewed by Cursor Bugbot for commit 17fc01d. Bugbot is set up for automated code reviews on this repo. Configure here.

Verify that hash field expiration emits the expected subkey-level
keyspace and keyevent notifications (hexpire/hexpired) on Redis 8.8+.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@nkaradzhov nkaradzhov requested a review from PavelPashov May 8, 2026 10:26
Make lint:changed pass on this branch: replace `as any` with a scoped
`@ts-expect-error`, type `setImmediateStub` via `ReturnType<typeof stub>`,
prefix unused destructured vars with `_`, and rewrite a generator spread
with `forEach` to drop one editor-only TS2802 suppression.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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