Skip to content

test(client): add message assertion test for XCLAIM JUSTID - #3376

Merged
nkaradzhov merged 1 commit into
redis:masterfrom
Piyush0049:test/xclaim-justid-messages
Jul 28, 2026
Merged

nkaradzhov merged 1 commit into
redis:masterfrom
Piyush0049:test/xclaim-justid-messages

Conversation

@Piyush0049

@Piyush0049 Piyush0049 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

This pull request updates packages/client/lib/commands/XCLAIM_JUSTID.spec.ts to resolve the inline maintainer TODO (// TODO: test with messages).

Previously, the unit test only asserted behavior against an empty stream ([]). This change adds an end-to-end test case that populates stream entries, moves them to pending status via xReadGroup, claims them using xClaimJustId, and verifies that the returned array of message IDs matches (['1-0', '2-0']). The test is also updated to run across both standalone client and cluster topologies via testUtils.testAll.

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)?

@Piyush0049
Piyush0049 force-pushed the test/xclaim-justid-messages branch from eb56642 to 51f64bb Compare July 28, 2026 18:03

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eb56642f45

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/client/lib/cluster/cluster-slots.ts Outdated

@nkaradzhov nkaradzhov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Piyush0049, looks good

@nkaradzhov
nkaradzhov merged commit ed6673d into redis:master Jul 28, 2026
15 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