-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only allow one runner at a time per connection to the agent by the protocol design #773
Changes from 1 commit
be1a035
2ae5d66
7c06235
8769abc
da4351c
645a8a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,8 @@ | |
namespace NUnit.Engine | ||
{ | ||
/// <summary> | ||
/// The ITestAgent interface is implemented by remote test agents. | ||
/// Defines the current communication protocol between the engine and the agent. This is an implementation detail | ||
/// which is in the process of changing as the dependency on .NET Framework's remoting is removed. | ||
/// </summary> | ||
public interface ITestAgent | ||
{ | ||
|
@@ -34,8 +35,51 @@ public interface ITestAgent | |
void ShutDown(); | ||
|
||
/// <summary> | ||
/// Creates a test runner | ||
/// Loads a package which will be used for all subsequent calls to the other methods (except | ||
/// <see cref="ShutDown"/>). This method must be called at least once before calling methods that operate on a | ||
/// test package. It may be called any number of times after those methods. | ||
/// </summary> | ||
ITestEngineRunner CreateRunner(TestPackage package); | ||
TestEngineResult Load(TestPackage package); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reading this, I feel the need to read all the code so as to see if all the methods of |
||
|
||
/// <summary> | ||
/// Unloads any loaded package. If none is loaded, the call is ignored. | ||
/// </summary> | ||
void Unload(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I expect your working on a minimal-change-basis here, but before we move on from this project entirely, I think we should consider if ignoring an empty Unload call rather than throwing is the behaviour we want here. It feels inconsistent with Reload's behaviour below... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ChrisMaddock It could have been different, but it's public behavior. I don't think we should change what has been a safe call into one that throws. UPDATE: Might not be public in this particular interface, but it is what we do in |
||
|
||
/// <summary> | ||
/// Reloads the loaded package. | ||
/// </summary> | ||
/// <exception cref="InvalidOperationException">Thrown if no package is loaded.</exception> | ||
TestEngineResult Reload(); | ||
|
||
/// <summary> | ||
/// Counts the test cases in the loaded package that would be run under the specified filter. | ||
/// </summary> | ||
int CountTestCases(TestFilter filter); | ||
|
||
/// <summary> | ||
/// Runs the tests in the loaded package synchronously. The listener interface is notified as the run | ||
/// progresses. | ||
/// </summary> | ||
TestEngineResult Run(ITestEventListener listener, TestFilter filter); | ||
|
||
#if !NETSTANDARD1_6 | ||
/// <summary> | ||
/// Start an asynchronous run of the tests in the loaded package. The listener interface is notified as the run | ||
/// progresses. | ||
/// </summary> | ||
AsyncTestEngineResult RunAsync(ITestEventListener listener, TestFilter filter); | ||
#endif | ||
|
||
/// <summary> | ||
/// Cancel the current test run. If no test is running, the call is ignored. | ||
/// </summary> | ||
/// <param name="force">Indicates whether tests that have not completed should be killed.</param> | ||
void StopRun(bool force); | ||
|
||
/// <summary> | ||
/// Returns information about the test cases in the loaded package that would be run under the specified filter. | ||
/// </summary> | ||
TestEngineResult Explore(TestFilter filter); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Others may not be confused, but I guess I find it confusing to see an interface that implements
ShutDown
even though it's not anIService
and which implements it without also implementingStartUp
.