Open inancgumus opened 1 year ago
The following script should panic, end the iteration, and kill the browser.
The problem is, it panics and kills the browser, however, the test carries on until eventually times out.
import { chromium } from 'k6/x/browser'; export default async function() { const browser = chromium.launch({ headless: true }); const context = browser.newContext(); try { context.cookies(); console.log("should not reach here"); } catch (e) { console.log('check panicked: ' + e) } finally { browser.close(); } }
It seems the code stuck here (browser.close();) while sending the CDP browser close message since k6ext.Panic killed the browser.
browser.close();
k6ext.Panic
Related: #815
I can't reproduce this anymore. Also, Pids() interface check seems to be stopped working when a panic occurs. For instance, context.exposeBinding() panics, but Panic misses the Pids() method.
Pids()
context.exposeBinding()
Panic
The following script should panic, end the iteration, and kill the browser.
The problem is, it panics and kills the browser, however, the test carries on until eventually times out.
It seems the code stuck here (
browser.close();
) while sending the CDP browser close message sincek6ext.Panic
killed the browser.Related: #815