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

abort after an await doesn't abort the test. #3983

Closed
mstoykov opened this issue Oct 14, 2024 · 0 comments · Fixed by #4017
Closed

abort after an await doesn't abort the test. #3983

mstoykov opened this issue Oct 14, 2024 · 0 comments · Fixed by #4017

Comments

@mstoykov
Copy link
Contributor

Description

If you run the following:

import exec from 'k6/execution'
import http from "k6/http";

export default async function() {
	await http.asyncRequest("GET", "https://k6.io")
	exec.test.abort("well")
}

You would expect k6 to stop and have this aborted. That isn't the case though due to upstream issue.

Basically due to how resolving a promise works it catches and eats the Interrupt created by the abort.

@mstoykov mstoykov self-assigned this Oct 14, 2024
@mstoykov mstoykov added this to the v0.55.0 milestone Oct 14, 2024
mstoykov added a commit that referenced this issue Oct 14, 2024
mstoykov added a commit that referenced this issue Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant