Skip to content
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

Node: Update tests for blocking commands. #2127

Merged
merged 8 commits into from
Aug 22, 2024

Conversation

Yury-Fridlyand
Copy link
Collaborator

Move to shared test, add version check and add more commands to check

@Yury-Fridlyand Yury-Fridlyand added node Node.js wrapper testing Everything about testing labels Aug 13, 2024
@Yury-Fridlyand Yury-Fridlyand requested a review from a team as a code owner August 13, 2024 21:24
const timeoutPromise = new Promise((resolve) => {
setTimeout(resolve, 500);
});
await Promise.race([promise, timeoutPromise]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if I understand the test, how do you know which one has resolved?
If I understand, what the test does is checking if at least one of the promises has resolved.
Then you resolve all the promises, if they are blocked and never timed out, we expect it to never resolve right?
So how the test doing it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

Copy link
Collaborator

@avifenesh avifenesh left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks for fixing the logic, even if wasn't yours, appriciate.

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
@Yury-Fridlyand Yury-Fridlyand merged commit 99f9e88 into valkey-io:main Aug 22, 2024
9 checks passed
@Yury-Fridlyand Yury-Fridlyand deleted the node/yuryf-valkey-174 branch August 22, 2024 17:02
prateek-kumar-improving pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Aug 22, 2024
* Update tests for blocking commands.

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
liorsve pushed a commit to liorsve/valkey-glide that referenced this pull request Aug 25, 2024
* Update tests for blocking commands.

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
liorsve pushed a commit to liorsve/valkey-glide that referenced this pull request Aug 25, 2024
* Update tests for blocking commands.

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node Node.js wrapper testing Everything about testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants