Closed obligaron closed 3 weeks ago
And one more comment:
As far as I understood the code (correct me if I'm wrong), we only keep a registry of the available test worker (test-thread) containers, but not the ones that have been given out for execution. That means if a code borrowed a test runner but never returned (some error), than the container will never be disposed. I'm not sure if it is bad, but we should be aware of this. Maybe we should keep a registry for all test workers to know at least that some of them was not properly returned (and show it in a diag message). What do you think?
I think it's a good idea. I was also thinking about asserting/writing a warning in TestRunnerManager.DisposeAsync
when we have missing / active TestThreadContainers
.
This should be easy with the current code, because the number of active/used containers is _usedTestThreadCount
. But perhaps it would be better to store them also in a ConcurrentBag
so we can log there Ids/Guids (see question above regarding TestWorkerId
).
Regarding the logging of active TestThreadContainers
.
I have implemented a collection of currently active/used containers that we can change in the TestRunnerManager
disposed method.
How should the logging be done? Which method would be appropriate (can be seen in all test frameworks)? 🤔
@obligaron Side note: For me it is better if you do not apply rebase or force push after an initial review has been done, because this way I have to make a full review again and I cannot just see the "diff". Merging the main to the PR branch is fine - we will squash it anyway.
This PR removes
ITestRunner.TestWorkerId
and related code.Notes
TestThreadContext
is handled byITestRunnerManager
.ITestRunner
is requested, a new instance is created (no caching). This should help to support scenario parallelization (for example #119).Types of changes
Checklist: