-
Notifications
You must be signed in to change notification settings - Fork 82
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
Tests are not truly parallelized when run with Traversal project #488
Comments
I believe what's happening is that when you run I cloned the repo and ran
Technically both executions are doing the same amount of work, just scheduled differently. To get traversal to match the behavior, you can build first with Now the test execution is identical. That will work if you are okay with building first and executing tests separately. The MSBuildSdks/src/Traversal/Sdk/Traversal.targets Lines 80 to 82 in 486c3e0
Currently, the only way to override it is by doing so in a custom after Traversal target:
<Project>
<PropertyGroup>
<CustomAfterTraversalTargets>$(MSBuildThisFileDirectory)\Custom.After.Traversal.targets</CustomAfterTraversalTargets>
</PropertyGroup>
</Project>
<Project>
<PropertyGroup>
<VSTestDependsOn Condition="'$(UsingMicrosoftTraversalSdk)' == 'true'"></VSTestDependsOn>
</PropertyGroup>
</Project> We could add a property to set so that Traversal doesn't call Build first if necessary. |
@jeffkl , thanks for quick response! Please see attached to https://youtrack.jetbrains.com/issue/DCVR-12167/dotCover-and-parallel-multiple-test-assemblies-execution video: first 10 secs and last 60 is enough to see that we do specify Today I was not able to reproduce the same problem behavior with |
The Traversal logic is doing simple MSBuild scheduling by calling the |
Hi!
For the same set of test projects, tests that are run from
.sln
file are executed faster than tests, that are run from traversal project file.How it looks in Process Explorer:
For a solution with dozens of test projects, when tests are run from traversal project, they are split among nodes, but when a node finishes its tests the node does not "steal" work from other nodes. As a result, one node does the most part of the work.
How to reproduce:
See instructions in https://github.com/batkaevruslan/dotCoverParallelizationIssue (ignore repo name, as at first we thought it's dotCover fault).
We tested it on several machines\OS with sdk 7.0.401 and got similar results:
Pay attention to the second run: Tests3.dll and Tests5.dll could have been executed in parallel with Tests2.dll, but they haven't.
The text was updated successfully, but these errors were encountered: