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: warp with try-catch the rust call and tests #2182

Merged
merged 4 commits into from
Aug 26, 2024

Conversation

adarovadya
Copy link
Collaborator

@adarovadya adarovadya commented Aug 21, 2024

Issue description - #2119
Warping the valueFromSplitPointer rust function with try-cache and adding tests

@adarovadya adarovadya changed the title warp with try-catch the rust call and tests Node: warp with try-catch the rust call and tests Aug 22, 2024
@adarovadya adarovadya force-pushed the custom-command-node-2 branch from 95e2bfd to 06941e9 Compare August 24, 2024 19:03
@adarovadya adarovadya marked this pull request as ready for review August 24, 2024 19:36
@adarovadya adarovadya requested a review from a team as a code owner August 24, 2024 19:36
resolve(resolveAns);
resolve(resolveAns);
} catch (err) {
console.log(err);
Copy link
Member

Choose a reason for hiding this comment

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

we dont console log in prod code
use the logger

Adar Ovadia added 4 commits August 25, 2024 12:46
Signed-off-by: Adar Ovadia <adarov@amazon.com>
Signed-off-by: Adar Ovadia <adarov@amazon.com>
Signed-off-by: Adar Ovadia <adarov@amazon.com>
Signed-off-by: Adar Ovadia <adarov@amazon.com>
@adarovadya adarovadya force-pushed the custom-command-node-2 branch from 53a39af to 1c32029 Compare August 25, 2024 12:47
@adarovadya adarovadya merged commit e1811c4 into valkey-io:main Aug 26, 2024
9 checks passed
@adarovadya adarovadya deleted the custom-command-node-2 branch August 26, 2024 10:22
prateek-kumar-improving pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Aug 26, 2024
* warp with try-catch the rust call and tests

* add test

---------

Signed-off-by: Adar Ovadia <adarov@amazon.com>
Co-authored-by: Adar Ovadia <adarov@amazon.com>
@Yury-Fridlyand Yury-Fridlyand added the node Node.js wrapper label Aug 26, 2024
Copy link
Collaborator

@Yury-Fridlyand Yury-Fridlyand left a comment

Choose a reason for hiding this comment

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

Use the Geller field while going thru warp

* @param valueResponse - Represents the encoded response of "value" to compare
* @returns Array of tuples, where first element is a test name/description, second - expected return value.
*/
export async function DumpAndRestureTest(
Copy link
Collaborator

Choose a reason for hiding this comment

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

We already have this test

@@ -32,6 +32,7 @@ import {
checkFunctionStatsResponse,
convertStringArrayToBuffer,
createLuaLibWithLongRunningFunction,
DumpAndRestureTest,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Resture? Who is that?

@@ -242,6 +243,38 @@ describe("GlideClient", () => {
},
);

it.each([ProtocolVersion.RESP2, ProtocolVersion.RESP3])(
`dump and restore transactions_%p`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

We alreayd have such test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node Node.js wrapper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants