-
Notifications
You must be signed in to change notification settings - Fork 71
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
rpc calls create unresolved timeouts/promises until HttpClient.DEFAULT_TIMEOUT as such jest tests warning #172
Comments
The RPC call should resolve as soon as a response is received, or after the default timeout, whichever happens first. Can you give a specific example of different behavior? |
the rpc call itself does resolve, but it creates another unresolved timeout or promise for checking the timeout that makes jest complain
jest test demonstrating this
|
I haven't been able to recreate the issue in a jest project, but are you able to test this commit? c0651ab It cancels the timeout promise on successful response. Otherwise, maybe you have a project I could check out to recreate? |
Fixed with the last release: 96daaa0 |
Hello again
Also problem I experienced is that HttpClient creates unresolved timeouts/promises until HttpClient.DEFAULT_TIMEOUT - timeout check
this results in jest tests giving warnings and not exiting properly
this can be fixed by settings HttpClient.DEFAULT_TIMEOUT to a low value, for example 1000, or by using the jest --forceExit, or by canceling the unresolved timeout (or was it promise?) on successful result from rpc call
Thank you
The text was updated successfully, but these errors were encountered: