-
Notifications
You must be signed in to change notification settings - Fork 69
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
Node: Update tests for blocking commands. #2127
Conversation
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
node/tests/SharedTests.ts
Outdated
const timeoutPromise = new Promise((resolve) => { | ||
setTimeout(resolve, 500); | ||
}); | ||
await Promise.race([promise, timeoutPromise]); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
There was a problem hiding this 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>
* Update tests for blocking commands. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
* Update tests for blocking commands. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
* Update tests for blocking commands. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Move to shared test, add version check and add more commands to check