Skip to content

Commit d5db6da

Browse files
authored
Allow dumps to be captured for SDK integration tests (dotnet#27094)
* Allow dumps to be captured for SDK integration tests SDK tests are currently not running on Helix. There is ongoing work to allow these to be run on Helix. In the meanwhile, we have a bunch of tests that are quarantined, succeeding for 30 days, but cannot be turned on because it's unclear why they hang. This PR changes the tests to use `dotnet test` for their runs and uses the cool new features to enforce test hangs and capture dumps. * Unquarantine passing tests
1 parent 42897a5 commit d5db6da

13 files changed

+27
-121
lines changed

eng/QuarantinedTests.BeforeArcade.props

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
<Project>
2-
<PropertyGroup>
2+
<PropertyGroup Condition="'$(UseVSTestRunner)' != 'true'">
33
<_QuarantinedTestRunAdditionalArgs>-trait "Quarantined=true"</_QuarantinedTestRunAdditionalArgs>
44
<_NonQuarantinedTestRunAdditionalArgs>-notrait "Quarantined=true"</_NonQuarantinedTestRunAdditionalArgs>
55
</PropertyGroup>
66

7+
<PropertyGroup Condition="'$(UseVSTestRunner)' == 'true'">
8+
<_QuarantinedTestRunAdditionalArgs>--filter Quarantined=true</_QuarantinedTestRunAdditionalArgs>
9+
<_NonQuarantinedTestRunAdditionalArgs>--filter Quarantined!=true</_NonQuarantinedTestRunAdditionalArgs>
10+
</PropertyGroup>
11+
712
<PropertyGroup>
813
<TestRunnerAdditionalArguments Condition="'$(RunQuarantinedTests)' == ''">$(_NonQuarantinedTestRunAdditionalArgs) $(TestRunnerAdditionalArguments)</TestRunnerAdditionalArguments>
914
<TestRunnerAdditionalArguments Condition="'$(RunQuarantinedTests)' == 'true'">$(_QuarantinedTestRunAdditionalArgs) $(TestRunnerAdditionalArguments)</TestRunnerAdditionalArguments>

eng/Workarounds.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PublishWindowsPdb>false</PublishWindowsPdb>
1414
</PropertyGroup>
1515

16-
<PropertyGroup>
16+
<PropertyGroup Condition="'$(UseVSTestRunner)' != 'true'">
1717
<!-- Xunit output is piped into a file anyways, so color codes aren't useful. -->
1818
<TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) -nocolor</TestRunnerAdditionalArguments>
1919
</PropertyGroup>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
<!-- UseVSTestRunner must be configured before $(RepoRoot)\Directory.Build.props is included. -->
3+
<PropertyGroup>
4+
<UseVSTestRunner>true</UseVSTestRunner>
5+
<TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) --blame "CollectHangDump;TestTimeout=6m"</TestRunnerAdditionalArguments>
6+
</PropertyGroup>
7+
8+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
9+
</Project>

src/Components/WebAssembly/Sdk/integrationtests/WasmBuildIntegrationTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ public async Task Build_Hosted_Works()
287287
}
288288

289289
[Fact]
290-
[QuarantinedTest]
291290
public async Task Build_SatelliteAssembliesAreCopiedToBuildOutput()
292291
{
293292
// Arrange

src/Components/WebAssembly/Sdk/integrationtests/WasmBuildLazyLoadTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ public async Task Build_LazyLoadExplicitAssembly_Release_Works()
8989
}
9090

9191
[Fact]
92-
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23756")]
9392
public async Task Publish_LazyLoadExplicitAssembly_Debug_Works()
9493
{
9594
// Arrange

src/Components/WebAssembly/Sdk/integrationtests/WasmCompressionTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
1111
public class WasmCompressionTests
1212
{
1313
[Fact]
14-
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23397")]
1514
public async Task Publish_UpdatesFilesWhenSourcesChange()
1615
{
1716
// Arrange
@@ -51,7 +50,6 @@ public async Task Publish_UpdatesFilesWhenSourcesChange()
5150
}
5251

5352
[Fact]
54-
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23397")]
5553
public async Task Publish_WithoutLinkerAndCompression_UpdatesFilesWhenSourcesChange()
5654
{
5755
// Arrange
@@ -82,7 +80,6 @@ public async Task Publish_WithoutLinkerAndCompression_UpdatesFilesWhenSourcesCha
8280
}
8381

8482
[Fact]
85-
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23756")]
8683
public async Task Publish_WithLinkerAndCompression_IsIncremental()
8784
{
8885
// Arrange

src/Components/WebAssembly/Sdk/integrationtests/WasmPublishIntegrationTest.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ public async Task Publish_WithScopedCss_Works()
146146
}
147147

148148
[Fact]
149-
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23756")]
150149
public async Task Publish_InRelease_Works()
151150
{
152151
// Arrange
@@ -314,7 +313,6 @@ public async Task Publish_WithTrimmingdDisabled_Works()
314313
}
315314

316315
[Fact]
317-
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23756")]
318316
public async Task Publish_SatelliteAssemblies_AreCopiedToBuildOutput()
319317
{
320318
// Arrange
@@ -348,7 +346,6 @@ public async Task Publish_SatelliteAssemblies_AreCopiedToBuildOutput()
348346
}
349347

350348
[Fact]
351-
[QuarantinedTest]
352349
public async Task Publish_HostedApp_DefaultSettings_Works()
353350
{
354351
// Arrange
@@ -410,7 +407,6 @@ public async Task Publish_HostedApp_DefaultSettings_Works()
410407
}
411408

412409
[Fact]
413-
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23756")]
414410
public async Task Publish_HostedApp_ProducesBootJsonDataWithExpectedContent()
415411
{
416412
// Arrange
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
<!-- UseVSTestRunner must be configured before the $(RepoRoot)\Directory.Build.props is included. -->
3+
<PropertyGroup>
4+
<UseVSTestRunner>true</UseVSTestRunner>
5+
<TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) --blame "CollectHangDump;TestTimeout=6m"</TestRunnerAdditionalArguments>
6+
</PropertyGroup>
7+
8+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
9+
</Project>

src/Razor/Microsoft.NET.Sdk.Razor/integrationtests/Microsoft.NET.Sdk.Razor.IntegrationTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<!--

src/Razor/Microsoft.NET.Sdk.Razor/integrationtests/MvcBuildIntegrationTest21.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using System.IO;
55
using System.Threading.Tasks;
6-
using Microsoft.AspNetCore.Testing;
76
using Xunit;
87

98
namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
@@ -19,7 +18,6 @@ public MvcBuildIntegrationTest21(LegacyBuildServerTestFixture buildServer)
1918
public override string TargetFramework => "netcoreapp2.1";
2019

2120
[Fact]
22-
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/25042")]
2321
public async Task Building_WorksWhenMultipleRazorConfigurationsArePresent()
2422
{
2523
using (var project = CreateTestProject())

0 commit comments

Comments
 (0)