Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow workers to communicate recoverable errors
A worker may encounter an error that does not necessarily require stopping the execution of a test script, e.g. a local worker may not be able to load a plugin. The worker can communicate such errors by setting a "level" property on the workerError message. This change takes level into account for determining whether the worker has stopped running or not. Previous version of this code has a bug, where the stoppedError state assigned to the worker [1] would get overridden elsewhere meaning that the condition that determined whether all workers exited [2] would not evaluate to true as expected. It also had the same issue of not taking level into account, meaning that code that handled loading plugins in local worker threads[3] should have stopped the execution of a test early, but didn't. 1. https://github.com/artilleryio/artillery/blob/1f6e1c6d95d943f1ee6e5ef5b422f8ea70c24b85/packages/artillery/lib/launch-platform.js#L79 2. https://github.com/artilleryio/artillery/blob/1f6e1c6d95d943f1ee6e5ef5b422f8ea70c24b85/packages/artillery/lib/launch-platform.js#L242 3. https://github.com/artilleryio/artillery/blob/1f6e1c6d95d943f1ee6e5ef5b422f8ea70c24b85/packages/artillery/lib/platform/local/worker.js#L160-L167
- Loading branch information