Closed vladplotnik closed 1 year ago
I was taking a look at K6 and Goja sources and they are not thread-safe. This happens because Goja caches information about each field in the toValue(param)
parameter in the Runtime
object. I suspect that the Tracetest module's Constructor
function is being called several times in parallel by k6, thus making this issue happen.
Adding a mutex to protect the return rt.ToValue(t).ToObject(rt)
call would probably solve this issue.
@danielbdias @xoscar can you confirm this?
@mathnogueira yes it makes sense, we can try that fix
Folks, based on our discussion I've opened #6 to solve that. Adding a mutex on the constructor solves the problem.
Released version v0.1.6 with hotfix.
@vladplotnik if you have the opportunity, can you check if your load test works with this new release?
@danielbdias, I have tried the new version. It works as expected and starts the load test immediately. Kudos for the super-fast hotfix! 🙌
Contact Details
vlad.plotnik@gmail.com
What happened?
We use k6 and Tracetest to perform load tests of our system. Everything works great except for the time when the K6 load test fails to run due to a concurrency error. This requires starting the load test command several times in the console until it eventually starts successfully. The load test doesn't change during this time. It is also worth mentioning that the load test starts successfully if we delete the Tracetest constructor from the script.
const tracetest = Tracetest({ serverUrl: "http://localhost:11633", });
See the example of the Tracetest configuration and a sample of the load test here https://github.com/vladplotnik/k6-tracetest-load-tests
We need to use the Tracetest extension to collect traces and assert them using the Tracetest UI. Any help would be appreciated. Thank you!
Version
1.0.0 (Default)
Relevant log output
Code of Conduct