From 5f4ec806f038523b3d749a13cef2cdb46dcdefcc Mon Sep 17 00:00:00 2001 From: Oleg Bespalov Date: Mon, 24 Jan 2022 09:44:07 +0100 Subject: [PATCH] Improve clarity Co-authored-by: yorugac --- .../markdown/docs/02 javascript api/01 Init context/open.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/markdown/docs/02 javascript api/01 Init context/open.md b/src/data/markdown/docs/02 javascript api/01 Init context/open.md index 7b85116c85..f511764693 100644 --- a/src/data/markdown/docs/02 javascript api/01 Init context/open.md +++ b/src/data/markdown/docs/02 javascript api/01 Init context/open.md @@ -23,7 +23,7 @@ See the example further down on this page. For a more in-depth description, see #### Breaking change in v0.36.0 -Since k6 v0.36.0 we also restricted usage of the `open(...)` under the `__VU` condition. A code like `if (__VU >0) { const arr = open("./arr.json"); }` should cause an error. +Since k6 v0.36.0, VUs are now restricted to only `open()` files that were also opened in the [init context](https://k6.io/docs/using-k6/test-life-cycle/#init-and-vu-stages) of the first VU - the one that was initialized to get the exported `options` from the JS script (`__VU==0`). This means that the code like `if (__VU > 0) { const arr = open("./arr.json"); }` will result in an error.