From 74ee448fb58a89f8c7f8f900fd11c10724c47546 Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Mon, 3 Feb 2020 21:38:49 -0800 Subject: [PATCH 1/5] Add debug information for `Assert` failures in `MaximumOSVersionTest` --- .../Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs b/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs index 6e983ce08d4..18a2713edc8 100644 --- a/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs +++ b/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs @@ -43,7 +43,7 @@ public void RunTest_Win10_RS4() Assert.NotNull(versionKey); var currentVersion = (string)versionKey.GetValue("CurrentBuildNumber"); Assert.NotNull(currentVersion); - Assert.True(17134 >= int.Parse(currentVersion)); + Assert.True(17134 >= int.Parse(currentVersion), $"Unexpected build number {currentVersion} on {Environment.OSVersion}."); } [ConditionalFact] @@ -56,7 +56,7 @@ public void RunTest_Win10_19H2() Assert.NotNull(versionKey); var currentVersion = (string)versionKey.GetValue("CurrentBuildNumber"); Assert.NotNull(currentVersion); - Assert.True(18363 >= int.Parse(currentVersion)); + Assert.True(18363 >= int.Parse(currentVersion), $"Unexpected build number {currentVersion} on {Environment.OSVersion}."); } } From ab0d651dbd8e0f9fb22a27ae140ac2a55eedc805 Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Wed, 5 Feb 2020 16:10:32 -0800 Subject: [PATCH 2/5] Update src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs Co-Authored-By: Chris Ross --- .../Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs b/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs index 18a2713edc8..1bade96bccd 100644 --- a/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs +++ b/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs @@ -43,7 +43,7 @@ public void RunTest_Win10_RS4() Assert.NotNull(versionKey); var currentVersion = (string)versionKey.GetValue("CurrentBuildNumber"); Assert.NotNull(currentVersion); - Assert.True(17134 >= int.Parse(currentVersion), $"Unexpected build number {currentVersion} on {Environment.OSVersion}."); + Assert.True(17134 >= int.Parse(currentVersion), $"Unexpected build number {currentVersion} on {Environment.OSVersion.Version}."); } [ConditionalFact] From c3406b218c43509a0ef80647ccc23240bab1d79a Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Wed, 5 Feb 2020 16:12:58 -0800 Subject: [PATCH 3/5] Try with VS2019 queues --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0b5327146dc..fc1a341a4e5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -75,10 +75,10 @@ stages: pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: NetCorePublic-Pool - queue: BuildPool.Windows.10.Amd64.VS2017.Open + queue: BuildPool.Server.Amd64.VS2019.Open ${{ if ne(variables['System.TeamProject'], 'public') }}: name: NetCoreInternal-Pool - queue: BuildPool.Windows.10.Amd64.VS2017 + queue: BuildPool.Server.Amd64.VS2019 variables: # Only enable publishing in official builds. - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: From 28dd096536a5c2dac086d3619f5d46248bbd60d5 Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Wed, 5 Feb 2020 16:13:48 -0800 Subject: [PATCH 4/5] Missed a spot --- .../Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs b/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs index 1bade96bccd..a56c7178320 100644 --- a/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs +++ b/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs @@ -56,7 +56,7 @@ public void RunTest_Win10_19H2() Assert.NotNull(versionKey); var currentVersion = (string)versionKey.GetValue("CurrentBuildNumber"); Assert.NotNull(currentVersion); - Assert.True(18363 >= int.Parse(currentVersion), $"Unexpected build number {currentVersion} on {Environment.OSVersion}."); + Assert.True(18363 >= int.Parse(currentVersion), $"Unexpected build number {currentVersion} on {Environment.OSVersion.Version}."); } } From ec8c1b84317b7cf889e7c1d97416383b985f949e Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Wed, 4 Mar 2020 10:38:47 -0800 Subject: [PATCH 5/5] Skip MaximumOSVersion tests on .NET due to xunit issue --- .../Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs b/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs index a56c7178320..3cafb037d07 100644 --- a/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs +++ b/src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs @@ -34,6 +34,7 @@ public void RunTheory_Win7DoesRunOnWin7(int arg) } [ConditionalFact] + [FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "https://github.com/xunit/xunit/issues/2076")] [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10_RS4)] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] public void RunTest_Win10_RS4() @@ -47,6 +48,7 @@ public void RunTest_Win10_RS4() } [ConditionalFact] + [FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "https://github.com/xunit/xunit/issues/2076")] [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10_19H2)] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] public void RunTest_Win10_19H2()