-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Testing: Add a LiveParallelizable
that runs Live tests in parallel
#6905
Comments
We recently started using the test framework and see that if there are multiple tests within a class, we cannot run the tests with the Parallelizable attribute. But we would like to run the live tests in parallel. Voting to have this feature. |
I don't think we can make it parallel friendly because of how NUnit manages test class instances (not creating an instance per test). |
@pakrym We won't be able to go as far as parallelization per single test. That is probably true for live tests (at least for Storage) due to limitation you mentioned. However, there's a way to apply NUnit Parallelizable attribute in such a way that test classes are executed in parallel but within class methods go serially (there are few ways to achieve that). I would take ability to go parallel per class any day instead of current situation. In my experiment I applied azure-sdk-for-net/sdk/core/Azure.Core.TestFramework/src/ClientTestFixtureAttribute.cs Lines 58 to 67 in 52fb9b7
|
Very good point Kamil. I think the parallelization of test classes is technically achieveable. |
Fixes: #6905 In this PR: - introduce LiveParallizable attribute. - changed scope of DiagosticScopeInterceptor as it's not thread safe, see: - https://dev.azure.com/azure-sdk/internal/_build/results?buildId=649697&view=results - https://dev.azure.com/azure-sdk/internal/_build/results?buildId=649767&view=results
Fixes: Azure#6905 In this PR: - introduce LiveParallizable attribute. - changed scope of DiagosticScopeInterceptor as it's not thread safe, see: - https://dev.azure.com/azure-sdk/internal/_build/results?buildId=649697&view=results - https://dev.azure.com/azure-sdk/internal/_build/results?buildId=649767&view=results
We need to run tests sequentially when
AZURE_TEST_MODE
isRecord
orPlayback
. It would be nice to run tests in parallel whenAZURE_TEST_MODE
isLive
but nUnit doesn't allow that kind of flexibility out of the box. We should investigate adding a customLiveParallelizable
attribute at the assembly level.The text was updated successfully, but these errors were encountered: