-
Notifications
You must be signed in to change notification settings - Fork 152
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
NUnit 3.5.0 defaults to single agent process when using an nunit project file #116
Comments
My suspicion is that we are implementing one process per command-line item where we previously did one process per assembly. There were a number of changes in how runners were set up in 3.5, so it's credible that this error could have come up, but I'm marking it confirm until I can verify it. |
Confirmed based on code review. We even have a test that makes sure things happen as described by @davidjward30. When neither the project file nor the command line specifies running in multiple processes, we should either default to multiple process or base the decision on whether the project file contains more than one assembly. |
I've huge drawback performances due to this issues(we have an 8 core computer that runs a project with 40 tests assemblies only 1 core at a time. I'm very interessted to know the current status of this and if there is a workaround(except going back to the V3.4.1 or specifying the 40 projects manually? |
As you can see from the issue itself, the status is that nobody is working on it. 😞 I triaged the issue, confirming it and giving it a high priority. Now it's waiting for somebody to step up to fix it. That's how it works with a group of volunteers, I'm afraid. If I remember correctly, the workaround is to not rely on defaults but specify the process model and number of agents on the command-line. Have you tried that? |
@CharliePoole what are we talking here, is this the bad test line? |
@jnm2 That test isn't bad because EngineTests.nunit only contains a single assembly. We. would need another test using a project with multiple assemblies. Getting the right runner chosen would be a first step in fixing this but there may be more to it once that's done. |
@CharliePoole I tried to specify the number of process with the |
You want --process=Multiple --agents=n rather than --workers, which gives the number of test threads within each process. |
@CharliePoole Sorry, I took the parameter from the documentation and I did a mistake, in my real case I've I just tried to add the |
--process=multiple means to run each assembly in a separate process. Separate means run them all in the same process. --agents is used to limit the number of processes created, which is supposed to default to the number of assemblies. The XML result will tell you the process id under which each assembly ran. |
@jnm2 Are you actually still working on this? |
According to a separate report, the same thing happens with multiple .csproj files specified on the command-line rather than assemblies. |
@CharliePoole This is dead last on my list of tracked issues. Back when I was working on it, I was much lower on the learning curve. Would you be interested in taking over? |
I thought about doing it but my question was intended more as a reminder that nobody is working on it if you aren't, because your name is there. In the past, I've done the same myself when I thought I was probably the only one to work on a particular issue, so if that's the case it's OK to keep it. Otherwise, remember that nobody will work on a job that has your name on it, except in certain corporate infighting situations... 😸 It only comes up in this case because somebody mentioned it in a different issue, which we marked as a duplicate. |
Okay. Since a fresh start will be needed no matter who picks it up, I'll stop tracking it as mine. |
NUnit 3.5.0 defaults to single agent process when using an nunit project file. This is an unexpected change in behaviour from 3.4.1.
Reproduction:
input.nunit:
Result;
When 3.4.1 reads an .nunit config file, it defaults to multiple processes.
When 3.5.0 reads an .nunit config file it defaults to single process.
When either 3.4.1 or 3.5.0 are passed a list of assemblies at the command line, both default to multiple processes.
Expected behaviour:
Default to multiple processes when using a project file.
Workaround:
Add --process=Multiple
The text was updated successfully, but these errors were encountered: