You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of a potential source of confusion and of bugs rather than an actual bug. I found it only by inspection while helping some users of NUnit understand how the framework works but I have not built and tested it.
The method TestAssemblyRUnner.StartRun takes an ITestListener as its third parameter. If the special boolean setting FrameworkPackageSettings.SynchronousEvents is set, the argument is ignored. If it is not set, then an EventPump is created and TestExecutionContext.TestListener is set to it.
Failing to use the argument doesn't cause a problem because the same listener passed in has already been set in the context at the point of call. I'm fairly confident of this even though I haven't tested it, since the methods involved are private.
I feel that this would be a source of confusion for anyone not familiar with the history, i.e. why we created that setting in the first place. Obviously, the TestAdapter relies on it as does the Microsoft Test Explorer.
I suggest removing the parameter and simply using the listener passed in the context when creating the EventPump. That would make it much clearer what is going on and why.
The text was updated successfully, but these errors were encountered:
This is more of a potential source of confusion and of bugs rather than an actual bug. I found it only by inspection while helping some users of NUnit understand how the framework works but I have not built and tested it.
The method TestAssemblyRUnner.StartRun takes an
ITestListener
as its third parameter. If the special boolean settingFrameworkPackageSettings.SynchronousEvents
is set, the argument is ignored. If it is not set, then anEventPump
is created andTestExecutionContext.TestListener
is set to it.Failing to use the argument doesn't cause a problem because the same listener passed in has already been set in the context at the point of call. I'm fairly confident of this even though I haven't tested it, since the methods involved are private.
I feel that this would be a source of confusion for anyone not familiar with the history, i.e. why we created that setting in the first place. Obviously, the TestAdapter relies on it as does the Microsoft Test Explorer.
I suggest removing the parameter and simply using the listener passed in the context when creating the
EventPump
. That would make it much clearer what is going on and why.The text was updated successfully, but these errors were encountered: