Skip to content

Adapt legacy sentinel tests to use the new test utils #2976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 27, 2025

Conversation

htemelski
Copy link

@htemelski htemelski commented May 27, 2025

Description

Modified the sentinel test-util framework to be a wrapper of the generic test-utils. This allows us to create containers based on the command line arguments (used for testing with different redis versions in our CI/CD pipeline)

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

@@ -1020,7 +1012,7 @@ describe.skip('legacy tests', () => {
this.timeout(30000);
const csc = new BasicPooledClientSideCache();

sentinel = frame.getSentinelClient({nodeClientOptions: {RESP: 3}, clientSideCache: csc, masterPoolSize: 5});
sentinel = frame.getSentinelClient({nodeClientOptions: {RESP: 3 as const}, RESP: 3 as const, clientSideCache: csc, masterPoolSize: 5});
Copy link
Collaborator

Choose a reason for hiding this comment

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

why the double {RESP: 3 as const}, RESP: 3 as const,

Copy link
Collaborator

Choose a reason for hiding this comment

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

false alarm

Copy link
Author

Choose a reason for hiding this comment

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

Without the second RESP: 3 as const, I was getting Client Side Caching is only supported with RESP3 error. I couldn't figure out why it was happening. Considering that the SentinelFramework is used only for testing, I didn't want to spend too much time on it.

@htemelski htemelski merged commit f346bad into master May 27, 2025
11 checks passed
@htemelski htemelski deleted the sentinel-changes branch May 27, 2025 11:21
florian-schunk pushed a commit to florian-schunk/node-redis that referenced this pull request Jun 18, 2025
* modified legacy sentinel tests

* Adapt legacy sentinel tests to use the new test utils

* modify tmpdir creation

* reduced sentinel config timeouts, removed unneeded comment

---------

Co-authored-by: H. Temelski <[email protected]>
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.

3 participants