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

Result calling issue #640

Closed
wants to merge 2 commits into from
Closed

Result calling issue #640

wants to merge 2 commits into from

Conversation

sfc-gh-ext-simba-jy
Copy link
Collaborator

@sfc-gh-ext-simba-jy sfc-gh-ext-simba-jy commented Sep 20, 2023

Description

This is a PR to investigate the issue that the result.js called twice per execution.
How to Test: Run SNOWFLAKE_TEST_USER="" SNOWFLAKE_TEST_PASSWORD="!" SNOWFLAKE_TEST_ACCOUNT="" SNOWFLAKE_TEST_WAREHOUSE="" SNOWFLAKE_TEST_DATABASE="" SNOWFLAKE_TEST_SCHEMA="" npm test

Here is my trace level logs: snowflake.log

ChecklistC:\Users\JYun\workspaces\snowflake-connector-nodejs\testing.js

  • Format code according to the existing code style (run npm run lint:check -- CHANGED_FILES and fix problems in changed code)
  • Create tests which fail without the change (if possible)
  • Make all tests (unit and integration) pass (npm run test:unit and npm run test:integration)
  • Extend the README / documentation and ensure is properly displayed (if necessary)
  • Provide JIRA issue id (if possible) or GitHub issue id in commit message

complete: function (err, stmt)
{
testUtil.checkError(err);
var stream = stmt.streamRows();
Copy link
Collaborator

Choose a reason for hiding this comment

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

you are reading from stream here - so you need to set streamResult to true as described in https://docs.snowflake.com/en/developer-guide/node-js/nodejs-driver-consume#streaming-results

Copy link
Collaborator Author

@sfc-gh-ext-simba-jy sfc-gh-ext-simba-jy Sep 20, 2023

Choose a reason for hiding this comment

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

I set this because this is a testing code. Although I set streamResult:true option, the driver still called result.js twice. I remove the stream and just added simple check.

@sfc-gh-ext-simba-jy
Copy link
Collaborator Author

This issue is solved, so close this PR.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 21, 2023
@sfc-gh-ext-simba-jy sfc-gh-ext-simba-jy deleted the resultissue branch December 17, 2024 17:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants