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

Write a test for request cancellation on timeout #239

Open
sholladay opened this issue Feb 22, 2020 · 0 comments
Open

Write a test for request cancellation on timeout #239

sholladay opened this issue Feb 22, 2020 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@sholladay
Copy link
Collaborator

When Ky times out the request with a TimeoutError, the expected behavior is for the request to be cancelled, which is accomplished using an AbortController. There was recently a regression that caused this not to happen. It is fixed by PR #238, however no test is included with that PR, as I was unable to figure out how to detect the cancellation on the server.

Investigate and implement a test for this behavior. I recommend doing so with a browser test in test/browser.js in order to test native fetch, as cancellation likely behaves a bit differently with node-fetch.

@sholladay sholladay added the help wanted Extra attention is needed label Feb 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant