k6 icon indicating copy to clipboard operation
k6 copied to clipboard

abort after an await doesn't abort the test.

Open mstoykov opened this issue 1 year ago • 0 comments

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 avatar Oct 14 '24 15:10 mstoykov