PDGGK commented on PR #20:
URL: 
https://github.com/apache/iotdb-client-nodejs/pull/20#issuecomment-5055647863

   Thanks for the thorough review @CritasWang — applied both inline suggestions:
   
   - `open()`'s catch now clears `sessionId` (as `close()` does) and 
`statementId` too, per your suggestion, so a failure after `openSession` 
succeeds no longer leaves a stale id reachable via `getSessionId()`.
   - The teardown is wrapped in its own `try/catch`, so a cleanup failure can't 
replace the original setup error that's rethrown.
   
   Tests: strengthened the existing case to assert the original error surfaces 
(`.rejects.toThrow("auth failed")`), and added one for the post-`openSession` 
failure clearing the session id.
   
   On the `teardownConnection()` helper — agreed, the teardown now appears in 
three places. Happy to extract it, either here or as a small follow-up PR, 
whichever you'd prefer.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to