Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/EndToEnd.Tests/EndToEnd.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

<PropertyGroup>
<TargetFramework>$(SdkTargetFramework)</TargetFramework>
<!-- These tests rely on global process state, so run serially ([assembly: DoNotParallelize]). -->
<MSTestParallelizeScope></MSTestParallelizeScope>
<!-- These tests rely on global process state, so run serially. None makes MSTest.Sdk emit [assembly: DoNotParallelize]. -->
<MSTestParallelizeScope>None</MSTestParallelizeScope>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions test/EndToEnd.Tests/GivenDotNetUsesMSBuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#nullable disable

[assembly: DoNotParallelize]

namespace EndToEnd.Tests
{
[TestClass]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
namespace Microsoft.DotNet.Cli.Utils.Tests
{
#pragma warning disable CA1416
// These tests share a single hardcoded registry key (.NET_SDK_TEST_PROVIDER_KEY) and mutate it
// (create/add/remove/delete), so they must not run concurrently. xUnit ran methods within a class
// serially; under MSTest MethodLevel parallelism (see https://github.com/dotnet/sdk/pull/54766)
// they race, producing intermittent "expected 1, actual 2 dependents" and missing-subkey failures.
[DoNotParallelize]
[TestClass]
public class DependencyProviderTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
using Microsoft.DotNet.DotNetSdkResolver;
using Microsoft.DotNet.MSBuildSdkResolver;

[assembly: DoNotParallelize]

namespace Microsoft.DotNet.Cli.Utils.Tests
{
[TestClass]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<!-- This project's tests rely on global process state, so disable parallelization
(the repo default is MethodLevel). [assembly: DoNotParallelize] enforces serial execution. -->
<MSTestParallelizeScope></MSTestParallelizeScope>
<!-- For product build, the .NET Framework TFM only builds in the second build pass as it depends on assets from other
verticals that are built in the first build pass.
Disabling this project as references are not building in this case. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace Microsoft.DotNet.PackageInstall.Tests
{
[DoNotParallelize]
[TestClass]
public class EndToEndToolTests : SdkTest
Comment thread
Evangelink marked this conversation as resolved.
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public DotnetEnvironmentTestFixture()
public void Dispose() => Environment.SetEnvironmentVariable(_PATH_VAR_NAME, _originalPath);
}

[DoNotParallelize]
[TestClass]
public class ToolPackageDownloaderTests : SdkTest
Comment thread
Evangelink marked this conversation as resolved.
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

namespace Microsoft.DotNet.PackageInstall.Tests
{
[DoNotParallelize]
[TestClass]
public class ToolPackageInstallToManagedLocationInstaller : SdkTest
Comment thread
Evangelink marked this conversation as resolved.
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

namespace Microsoft.DotNet.PackageInstall.Tests
{
[DoNotParallelize]
[TestClass]
public class ToolPackageUninstallerTests : SdkTest
{
Comment thread
Evangelink marked this conversation as resolved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
namespace Microsoft.NET.Build.Containers.UnitTests
{
[TestClass]
// These tests mutate process-global environment variables (REGISTRY_AUTH_FILE and the
// registry credential vars) and rely on AuthHandshakeMessageHandler's static auth-header
// cache keyed by a shared registry name. Under MSTest method-level parallelism (the repo
// default) the methods/data rows race on that global state, so run them sequentially.
[DoNotParallelize]
public class AuthHandshakeMessageHandlerTests
Comment thread
Evangelink marked this conversation as resolved.
{
public TestContext TestContext { get; set; } = default!;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

namespace Microsoft.NET.Build.Tasks.UnitTests
{
[DoNotParallelize]
[TestClass]
public class GivenACheckForUnsupportedWinMDReferencesMultiThreading
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ namespace Microsoft.NET.Build.Tasks.UnitTests
/// location different from the <c>TaskEnvironment.ProjectDirectory</c> so a bug that fell
/// back to <c>Environment.CurrentDirectory</c> / <c>Path.GetFullPath</c> would surface here.
/// </summary>
[DoNotParallelize]
[TestClass]
public class GivenAGenerateBundleMultiThreading : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

namespace Microsoft.NET.Build.Tasks.UnitTests
{
[DoNotParallelize]
[TestClass]
public class GivenAGenerateClsidMapMultiThreading
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

namespace Microsoft.NET.Build.Tasks.UnitTests
{
[DoNotParallelize]
[TestClass]
public class GivenAGenerateDepsFilePathResolution : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

namespace Microsoft.NET.Build.Tasks.UnitTests
{
[DoNotParallelize]
[TestClass]
public class GivenAGenerateRuntimeConfigMultiThreading
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace Microsoft.NET.Build.Tasks.UnitTests
{
[DoNotParallelize]
[TestClass]
public class GivenAGenerateRuntimeConfigurationFiles
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ namespace Microsoft.NET.Build.Tasks.UnitTests
/// the task reads the on-disk data from the right place even when the process
/// current working directory differs from the project directory.
/// </summary>
[DoNotParallelize]
[TestClass]
public class GivenAGetPackagesToPrune
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

namespace Microsoft.NET.Build.Tasks.UnitTests
{
[DoNotParallelize]
[TestClass]
public class GivenAPickBestRidMultiThreading
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ namespace Microsoft.NET.Build.Tasks.UnitTests
/// Verifies TaskEnvironment-based path resolution against ProjectDirectory (not process CWD)
/// and that output metadata preserves the original path form.
/// </summary>
[DoNotParallelize]
[TestClass]
public class GivenAResolveAppHostsMultiThreading : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

namespace Microsoft.NET.Build.Tasks.UnitTests
{
[DoNotParallelize]
[TestClass]
public class GivenAResolvePackageAssetsMultiThreading
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Microsoft.NET.Build.Tasks.ConflictResolution;

namespace Microsoft.NET.Build.Tasks.UnitTests;
[DoNotParallelize]
[TestClass]
public class GivenAResolvePackageFileConflictsMultiThreading : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

namespace Microsoft.NET.Build.Tasks.UnitTests
{
[DoNotParallelize]
[TestClass]
public class GivenAResolveRuntimePackAssetsTask : SdkTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace Microsoft.NET.Build.Tasks.UnitTests
/// <see cref="TaskEnvironment"/>. Tasks default to <see cref="TaskEnvironment.Fallback"/>
/// which uses live process state, equivalent to the legacy single-threaded behavior.
/// </summary>
[DoNotParallelize]
[TestClass]
public class GivenATaskEnvironmentDefault
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ namespace Microsoft.NET.Build.Tasks.UnitTests;
/// These tests create files in a "project" directory, then verify task behavior by
/// passing RELATIVE paths and expecting tasks to resolve them via TaskEnvironment.
/// </summary>
[DoNotParallelize]
[TestClass]
public class GivenTasksUseAbsolutePaths : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
namespace Microsoft.NET.Sdk.Publish.Tasks.Tests
{
[TestClass]
[DoNotParallelize]
public class EnvironmentHelperTests
{
private const string TelemetryOptout = "DOTNET_CLI_TELEMETRY_OPTOUT";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
namespace Microsoft.NET.Sdk.Razor.Tool
{
[TestClass]
// GetPidFilePath_UsesEnvironmentVariablePathIfSpecified mutates the process-wide
// DOTNET_BUILD_PIDFILE_DIRECTORY environment variable that GetPidFilePath_ReturnsCorrectDefaultPath
// reads, so the methods of this class must not run in parallel with each other.
[DoNotParallelize]
public class ServerCommandTest
{
[TestMethod]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

namespace Microsoft.NET.Sdk.StaticWebAssets.Tests;

[DoNotParallelize]
[TestClass]
public class ComputeStaticWebAssetsTargetPathsMultiThreadingTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

namespace Microsoft.AspNetCore.Razor.Tasks;

// This test mutates the process-wide current directory, so it must not run
// concurrently with other tests under MSTest's method-level parallelization.
[DoNotParallelize]
[TestClass]
public class CollectStaticWebAssetsToCopyMultiThreadingTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

namespace Microsoft.NET.Sdk.StaticWebAssets.Tests;

[DoNotParallelize]
[TestClass]

public class ComputeEndpointsForReferenceStaticWebAssetsMultiThreadingTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,6 @@ public void PreservesAssetGroupsOnFrameworkAssets()
}

[TestMethod]
[DoNotParallelize]
public void MakeReferencedAssetOriginalItemSpecAbsolute_ResolvesAgainstProjectDirectoryNotProcessCurrentDirectory()
{
var testRoot = Path.Combine(AppContext.BaseDirectory, nameof(ComputeReferenceStaticWebAssetItemsTest), Guid.NewGuid().ToString("N"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

namespace Microsoft.NET.Sdk.StaticWebAssets.Tests;

[DoNotParallelize]
[TestClass]

public class DiscoverPrecompressedAssetsMultiThreadingTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ public void Fails_WhenEndpointWithoutAssetExists()
}

[TestMethod]
[DoNotParallelize]
public void Execute_RelativeTargetPropsFilePath_ResolvesAgainstProjectDirectory_NotProcessCurrentDirectory()
{
WithDecoyCwdAndProjectDirectory((projectDir, spawnDir) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

namespace Microsoft.NET.Sdk.StaticWebAssets.Tests;

// This test mutates the process-wide current directory, so it must not run
// concurrently with other tests under MSTest's method-level parallelization.
[DoNotParallelize]
[TestClass]
public class GenerateStaticWebAssetsManifestMultiThreadingTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

namespace Microsoft.NET.Sdk.StaticWebAssets.Tests;

// This test mutates the process-wide current directory, so it must not run
// concurrently with other tests under MSTest's method-level parallelization.
[DoNotParallelize]
[TestClass]
public class GenerateStaticWebAssetsPropsFileMultiThreadingTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@

namespace Microsoft.NET.Sdk.StaticWebAssets.Tests;

// Test parallelization is disabled assembly-wide via
// [assembly:CollectionBehavior(DisableTestParallelization = true)] in
// LegacyStaticWebAssetsV1IntegrationTest.cs, which already isolates the
// process-CWD mutation this test performs.
[DoNotParallelize]
[TestClass]
public class MergeConfigurationPropertiesMultiThreadingTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

namespace Microsoft.AspNetCore.Razor.Tasks;

// This test mutates the process-wide current directory, so it must not run
// concurrently with other tests under MSTest's method-level parallelization.
[DoNotParallelize]
[TestClass]
public class ReadStaticWebAssetsManifestFileMultiThreadingTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@

namespace Microsoft.NET.Sdk.StaticWebAssets.Tests;

// Test parallelization is disabled assembly-wide via
// [assembly:CollectionBehavior(DisableTestParallelization = true)] in
// LegacyStaticWebAssetsV1IntegrationTest.cs, which already isolates the
// process-CWD mutation these tests perform.
[DoNotParallelize]
[TestClass]
public class StaticWebAssetTaskEnvironmentTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

namespace Microsoft.AspNetCore.Razor.Tasks;

// This test mutates the process-wide current directory, so it must not run
// concurrently with other tests under MSTest's method-level parallelization.
[DoNotParallelize]
[TestClass]
public class StaticWebAssetsGeneratePackManifestMultiThreadingTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@

namespace Microsoft.AspNetCore.Razor.Tasks;

// Test parallelization is disabled assembly-wide via
// [assembly:CollectionBehavior(DisableTestParallelization = true)] in
// LegacyStaticWebAssetsV1IntegrationTest.cs, which already isolates the
// process-CWD mutation this test performs.
[DoNotParallelize]
[TestClass]
public class StaticWebAssetsGeneratePackagePropsFileMultiThreadingTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

namespace Microsoft.NET.Sdk.StaticWebAssets.Tests;

// This test mutates the process-wide current directory, so it must not run
// concurrently with other tests under MSTest's method-level parallelization.
[DoNotParallelize]
[TestClass]
public class UpdatePackageStaticWebAssetsMultiThreadingTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
namespace Microsoft.NET.ToolPack.Tests
{
[TestClass]
[DoNotParallelize]
public class GivenThatWeWantToPackAToolProjectWithPackagedShim : SdkTest
{
private string _testRoot;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
namespace Microsoft.TemplateEngine.Cli.UnitTests.PostActionTests
{
[TestClass]
// These tests mutate the process-global static Microsoft.DotNet.Cli.Utils.Reporter via
// Reporter.SetError, so they cannot run in parallel with each other (MSTest defaults to
// method-level parallelism in this repo).
[DoNotParallelize]
public class AddJsonPropertyPostActionTests
Comment thread
Evangelink marked this conversation as resolved.
{
// MSTest has no IClassFixture equivalent; a lazily-initialized static helper
Expand Down
1 change: 0 additions & 1 deletion test/dotnet-MsiInstallation.Tests/Framework/VMTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace Microsoft.DotNet.MsiInstallerTests.Framework
{
[DoNotParallelize]
public class VMTestBase : SdkTest, IDisposable
{
private VirtualMachine _vm;
Expand Down
7 changes: 0 additions & 7 deletions test/dotnet-aot.Tests/AssemblyInfo.cs

This file was deleted.

Loading
Loading