From 68b49db165d79fa5016ed857dafb7b004fe52abe Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Wed, 26 Apr 2023 20:53:10 -0500 Subject: [PATCH] Fix AotCompatibilityTests - Use Path.Combine so it works on non-Windows - Increase the timeout to 3 minutes, since slower machines are seeing this test take around 1 minute - Use the plain TreatWarningsAsErrors property --- .../Microsoft.IdentityModel.AotCompatibility.TestApp.csproj | 2 +- .../AotCompatibilityTests.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj b/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj index 085f0a39c0..a4a7f4211d 100644 --- a/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj +++ b/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj @@ -5,7 +5,7 @@ Exe true full - true + true diff --git a/test/Microsoft.IdentityModel.AotCompatibility.Tests/AotCompatibilityTests.cs b/test/Microsoft.IdentityModel.AotCompatibility.Tests/AotCompatibilityTests.cs index 85273f025f..dffd9587bd 100644 --- a/test/Microsoft.IdentityModel.AotCompatibility.Tests/AotCompatibilityTests.cs +++ b/test/Microsoft.IdentityModel.AotCompatibility.Tests/AotCompatibilityTests.cs @@ -35,7 +35,7 @@ public AotCompatibilityTests(ITestOutputHelper testOutputHelper) [Fact(Skip = "need to adjust timeout")] public void EnsureAotCompatibility() { - string testAppPath = @"..\..\..\..\Microsoft.IdentityModel.AotCompatibility.TestApp"; + string testAppPath = Path.Combine("..", "..", "..", "..", "Microsoft.IdentityModel.AotCompatibility.TestApp"); string testAppProject = "Microsoft.IdentityModel.AotCompatibility.TestApp.csproj"; // ensure we run a clean publish every time @@ -58,7 +58,7 @@ public void EnsureAotCompatibility() process.Start(); process.BeginOutputReadLine(); - Assert.True(process.WaitForExit(milliseconds: 60_000), "dotnet publish command timed out after 60 seconds."); + Assert.True(process.WaitForExit(milliseconds: 180_000), "dotnet publish command timed out after 3 minutes."); Assert.True(process.ExitCode == 0, "Publishing the AotCompatibility app failed. See test output for more details."); }