Closed
Description
Originally, in V2, it seemed to make sense to set CurrentContext
lazily to a new context in the getter, whenever it was found to be null.
Now, with parallel dispatching, things are more complicated. The context is changed as different tests begin to execute and the current work item both controls and depends upon it's content. When the context is discovered to be null, it's an error that we should not be masking.
The basic refactoring here is
- Make the getter function as a simple getter, returning null if that's what is found.
- Remove the
GetTestExecutionContext()
method, replacing all calls with use of the property. - Discover all points in the code where the context is found to be null, and fix them.
Obviously, the last point is going to be difficult.