@joebigelow / wix / commits / d20b6d41

feat(build): update xunit to version 2.5.0, fix occasional test timeout

chris_bednarski committed Jul 19, 2023 at 10:11 UTC d20b6d41283f2f9decc8ef98cae1d36b09198159
10 files changed +32 -32
src/internal/SetBuildNumber/Directory.Packages.props.pp
+5 -5
@@ -86,12 +86,12 @@
86 <!-- Keep the following versions in sync with internal\WixInternal.TestSupport.Native\packages.config -->
87 <ItemGroup>
88 <PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
89 - <PackageVersion Include="GitInfo" Version="2.2.0" />
89 + <PackageVersion Include="GitInfo" Version="2.3.0" />
90
91 - <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
92 - <PackageVersion Include="xunit" Version="2.4.2" />
93 - <PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
94 - <PackageVersion Include="xunit.assert" Version="2.4.2" />
91 + <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
92 + <PackageVersion Include="xunit" Version="2.5.0" />
93 + <PackageVersion Include="xunit.runner.visualstudio" Version="2.5.0" />
94 + <PackageVersion Include="xunit.assert" Version="2.5.0" />
95 </ItemGroup>
96
97 <ItemGroup>
src/internal/SetBuildNumber/SetBuildNumber.proj
+1 -1
@@ -117,6 +117,6 @@
117 BeforeTargets="AfterBuild" />
118
119 <ItemGroup>
120 - <PackageReference Include="GitInfo" Version="2.2.0" />
120 + <PackageReference Include="GitInfo" Version="2.3.0" />
121 </ItemGroup>
122 </Project>
src/internal/WixInternal.TestSupport.Native/build/WixInternal.TestSupport.Native.props
+2 -2
@@ -5,8 +5,8 @@
5 <PropertyGroup>
6 <RepoRootDir Condition=" '$(RepoRootDir)' == '' ">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), .gitignore))</RepoRootDir>
7 </PropertyGroup>
8 - <Import Project="$(RepoRootDir)\packages\xunit.core.2.4.2\build\xunit.core.props" Condition="Exists('$(RepoRootDir)\packages\xunit.core.2.4.2\build\xunit.core.props')" />
9 - <Import Project="$(RepoRootDir)\packages\xunit.runner.visualstudio.2.4.5\build\net462\xunit.runner.visualstudio.props" Condition="Exists('$(RepoRootDir)\packages\xunit.runner.visualstudio.2.4.5\build\net462\xunit.runner.visualstudio.props')" />
8 + <Import Project="$(RepoRootDir)\packages\xunit.core.2.5.0\build\xunit.core.props" Condition="Exists('$(RepoRootDir)\packages\xunit.core.2.5.0\build\xunit.core.props')" />
9 + <Import Project="$(RepoRootDir)\packages\xunit.runner.visualstudio.2.5.0\build\net462\xunit.runner.visualstudio.props" Condition="Exists('$(RepoRootDir)\packages\xunit.runner.visualstudio.2.5.0\build\net462\xunit.runner.visualstudio.props')" />
10 <PropertyGroup>
11 <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
12 </PropertyGroup>
src/internal/WixInternal.TestSupport.Native/build/WixInternal.TestSupport.Native.targets
+9 -9
@@ -22,28 +22,28 @@
22 <HintPath>$(RootPackagesFolder)xunit.abstractions.2.0.3\lib\netstandard2.0\xunit.abstractions.dll</HintPath>
23 </Reference>
24 <Reference Include="xunit.assert">
25 - <HintPath>$(RootPackagesFolder)xunit.assert.2.4.2\lib\netstandard1.1\xunit.assert.dll</HintPath>
25 + <HintPath>$(RootPackagesFolder)xunit.assert.2.5.0\lib\netstandard1.1\xunit.assert.dll</HintPath>
26 </Reference>
27 <Reference Include="xunit.core">
28 - <HintPath>$(RootPackagesFolder)xunit.extensibility.core.2.4.2\lib\netstandard1.1\xunit.core.dll</HintPath>
28 + <HintPath>$(RootPackagesFolder)xunit.extensibility.core.2.5.0\lib\netstandard1.1\xunit.core.dll</HintPath>
29 </Reference>
30 <Reference Include="xunit.execution.desktop">
31 - <HintPath>$(RootPackagesFolder)xunit.extensibility.execution.2.4.2\lib\net452\xunit.execution.desktop.dll</HintPath>
31 + <HintPath>$(RootPackagesFolder)xunit.extensibility.execution.2.5.0\lib\net452\xunit.execution.desktop.dll</HintPath>
32 </Reference>
33 </ItemGroup>
34
35 - <Import Project="$(RootPackagesFolder)xunit.core.2.4.2\build\xunit.core.targets" Condition="Exists('$(RootPackagesFolder)xunit.core.2.4.2\build\xunit.core.targets')" />
35 + <Import Project="$(RootPackagesFolder)xunit.core.2.5.0\build\xunit.core.targets" Condition="Exists('$(RootPackagesFolder)xunit.core.2.5.0\build\xunit.core.targets')" />
36 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
37 <PropertyGroup>
38 <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
39 </PropertyGroup>
40 - <Error Condition="!Exists('$(RootPackagesFolder)xunit.core.2.4.2\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '$(RootPackagesFolder)xunit.core.2.4.2\build\xunit.core.props'))" />
41 - <Error Condition="!Exists('$(RootPackagesFolder)xunit.core.2.4.2\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(RootPackagesFolder)xunit.core.2.4.2\build\xunit.core.targets'))" />
42 - <Error Condition="!Exists('$(RootPackagesFolder)xunit.runner.visualstudio.2.4.5\build\net462\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '$(RootPackagesFolder)xunit.runner.visualstudio.2.4.5\build\net462\xunit.runner.visualstudio.props'))" />
40 + <Error Condition="!Exists('$(RootPackagesFolder)xunit.core.2.5.0\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '$(RootPackagesFolder)xunit.core.2.5.0\build\xunit.core.props'))" />
41 + <Error Condition="!Exists('$(RootPackagesFolder)xunit.core.2.5.0\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(RootPackagesFolder)xunit.core.2.5.0\build\xunit.core.targets'))" />
42 + <Error Condition="!Exists('$(RootPackagesFolder)xunit.runner.visualstudio.2.5.0\build\net462\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '$(RootPackagesFolder)xunit.runner.visualstudio.2.5.0\build\net462\xunit.runner.visualstudio.props'))" />
43 </Target>
44
45 - <UsingTask AssemblyFile="$(RootPackagesFolder)xunit.runner.msbuild.2.4.2\build\net452\xunit.runner.msbuild.net452.dll" TaskName="Xunit.Runner.MSBuild.xunit" Architecture="x86" Condition=" '$(Platform)'!='x64' " />
46 - <UsingTask AssemblyFile="$(RootPackagesFolder)xunit.runner.msbuild.2.4.2\build\net452\xunit.runner.msbuild.net452.dll" TaskName="Xunit.Runner.MSBuild.xunit" Architecture="x64" Condition=" '$(Platform)'=='x64' " />
45 + <UsingTask AssemblyFile="$(RootPackagesFolder)xunit.runner.msbuild.2.5.0\build\net452\xunit.runner.msbuild.net452.dll" TaskName="Xunit.Runner.MSBuild.xunit" Architecture="x86" Condition=" '$(Platform)'!='x64' " />
46 + <UsingTask AssemblyFile="$(RootPackagesFolder)xunit.runner.msbuild.2.5.0\build\net452\xunit.runner.msbuild.net452.dll" TaskName="Xunit.Runner.MSBuild.xunit" Architecture="x64" Condition=" '$(Platform)'=='x64' " />
47 <Target Name="Test">
48 <!-- https://xunit.net/docs/running-tests-in-msbuild -->
49 <!-- https://github.com/xunit/xunit/issues/2188 -->
src/internal/WixInternal.TestSupport.Native/packages.config
+6 -6
@@ -7,10 +7,10 @@
7 when any of these versions are updated.
8 -->
9 <package id="xunit.abstractions" version="2.0.3" />
10 - <package id="xunit.assert" version="2.4.2" />
11 - <package id="xunit.core" version="2.4.2" />
12 - <package id="xunit.extensibility.core" version="2.4.2" />
13 - <package id="xunit.extensibility.execution" version="2.4.2" />
14 - <package id="xunit.runner.msbuild" version="2.4.2" />
15 - <package id="xunit.runner.visualstudio" version="2.4.5" />
10 + <package id="xunit.assert" version="2.5.0" />
11 + <package id="xunit.core" version="2.5.0" />
12 + <package id="xunit.extensibility.core" version="2.5.0" />
13 + <package id="xunit.extensibility.execution" version="2.5.0" />
14 + <package id="xunit.runner.msbuild" version="2.5.0" />
15 + <package id="xunit.runner.visualstudio" version="2.5.0" />
16 </packages>
src/internal/WixInternal.TestSupport/XunitExtensions/WixAssert.cs
+1 -1
@@ -91,7 +91,7 @@ namespace WixInternal.TestSupport
91 {
92 if (collection.Count > 0)
93 {
94 - Assert.True(false, $"The collection was expected to be empty, but instead was [{Environment.NewLine}\"{String.Join($"\", {Environment.NewLine}\"", collection)}\"{Environment.NewLine}]");
94 + Assert.Fail($"The collection was expected to be empty, but instead was [{Environment.NewLine}\"{String.Join($"\", {Environment.NewLine}\"", collection)}\"{Environment.NewLine}]");
95 }
96 }
97
src/test/burn/WixTestTools/ArpEntryInstaller.cs
+1 -1
@@ -31,7 +31,7 @@ namespace WixTestTools
31 }
32 else
33 {
34 - Assert.True(false, "Tried to unregister when not registered.");
34 + Assert.Fail("Tried to unregister when not registered.");
35 }
36 }
37
src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
+3 -3
@@ -152,7 +152,7 @@ namespace WixToolsetTest.CoreIntegration
152 WixAssert.StringEqual("http://wixtoolset.org/schemas/v4/2008/Burn", attribute.Value);
153 break;
154 default:
155 - Assert.False(true, $"Attribute: '{attribute.LocalName}', Value: '{attribute.Value}'");
155 + Assert.Fail($"Attribute: '{attribute.LocalName}', Value: '{attribute.Value}'");
156 break;
157 }
158 }
@@ -264,7 +264,7 @@ namespace WixToolsetTest.CoreIntegration
264 WixAssert.StringEqual("http://wixtoolset.org/schemas/v4/2008/Burn", attribute.Value);
265 break;
266 default:
267 - Assert.False(true, $"Attribute: '{attribute.LocalName}', Value: '{attribute.Value}'");
267 + Assert.Fail($"Attribute: '{attribute.LocalName}', Value: '{attribute.Value}'");
268 break;
269 }
270 }
@@ -808,7 +808,7 @@ namespace WixToolsetTest.CoreIntegration
808 return;
809 }
810
811 - Assert.False(true, "Expected exception not accepted.");
811 + Assert.Fail("Expected exception not accepted.");
812 }
813 }
814
src/wix/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs
+3 -3
@@ -109,7 +109,7 @@ namespace WixToolsetTest.CoreIntegration
109 return;
110 }
111
112 - Assert.True(false, "Expected WixException for missing entry section but expectations were not met.");
112 + Assert.Fail("Expected WixException for missing entry section but expectations were not met.");
113 }
114 }
115
@@ -139,7 +139,7 @@ namespace WixToolsetTest.CoreIntegration
139 return;
140 }
141
142 - Assert.True(false, "Expected WixException for missing entry section but expectations were not met.");
142 + Assert.Fail("Expected WixException for missing entry section but expectations were not met.");
143 }
144 }
145
@@ -169,7 +169,7 @@ namespace WixToolsetTest.CoreIntegration
169 return;
170 }
171
172 - Assert.True(false, "Expected WixException for missing entry section but expectations were not met.");
172 + Assert.Fail("Expected WixException for missing entry section but expectations were not met.");
173 }
174 }
175 }
src/wix/test/WixToolsetTest.CoreIntegration/PatchFixture.cs
+1 -1
@@ -575,7 +575,7 @@ namespace WixToolsetTest.CoreIntegration
575 var args = $"/a \"{Path.ChangeExtension(msiPath, "msi")}\" TARGETDIR=\"{targetDir}\" /qn";
576
577 var proc = Process.Start("msiexec.exe", args);
578 - proc.WaitForExit(10000);
578 + proc.WaitForExit(20000);
579
580 Assert.Equal(0, proc.ExitCode);
581 }