-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Problem Statement
During the development of the execution.test.fail
API #4672, we made the choice to store the TestStatus
instance that is passed to VUs and used to indicate that a test is marked as failed in the PreInitState
.
This decision was made for convinience, as that construct is directly accessible from VUs and thus from module code. However, at the time of implementation, we acknowledge this might not be the optimal place.
In an ideal implementation we would have most likely picked TestRunState
instead, and made sure that Runner
s have a pointer to it, and set the State
's TestStatus
themselves, instead of storing it in the PreInitState
.
However, after spending some time on that option, we rapidly realized that doing so would lead to a sizable refactor, and as the Runner instantiations are already only taking the PreInitState
as input, finding a way to get the TestStatus
pointer down in it would most likely mean refactoring a bunch of APIs along the way; which in the context of a v1.0.0 release candidate was not desirable.
Solution Space
TODO
Context
Original discussion: #4672 (comment)