Skip to content

Commit

Permalink
Fix For Xunit Async Tests (#3812)
Browse files Browse the repository at this point in the history
<!-- Please be sure to read the
[Contribute](https://github.com/reactiveui/reactiveui#contribute)
section of the README -->

**What kind of change does this PR introduce?**
<!-- Bug fix, feature, docs update, ... -->

Fix for XUint tests

**What is the current behavior?**
<!-- You can also link to an open issue here. -->

Xunit 2.6.6 + fails to pass tests due to parallelism

**What is the new behavior?**
<!-- If this is a feature change -->

Using XUnit 2.8.0 with config file setting the parallelAlgorithm to
aggressive

**What might this PR break?**

none

**Please check if the PR fulfills these requirements**
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)

**Other information**:
  • Loading branch information
ChrisPulman committed May 17, 2024
1 parent 1d11336 commit ebf7dcc
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<FodyVersion>6.8.0</FodyVersion>
<SplatVersion>15.0.1</SplatVersion>
<XamarinAndroidSupportVersion>28.0.0.3</XamarinAndroidSupportVersion>
<XUnitVersion>2.6.6</XUnitVersion>
<VerifyXUnitVersion>23.2.0</VerifyXUnitVersion>
<XUnitVersion>2.8.0</XUnitVersion>
<VerifyXUnitVersion>24.2.0</VerifyXUnitVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
Expand Down
4 changes: 4 additions & 0 deletions src/ReactiveUI.Testing.Tests/ReactiveUI.Testing.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@
<ItemGroup>
<None Include="API\**\*.txt" CopyToOutputDirectory="PreserveNewest" LinkBase="/" />
</ItemGroup>

<ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions src/ReactiveUI.Testing.Tests/xunit.runner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
"parallelAlgorithm": "aggressive"
}
4 changes: 4 additions & 0 deletions src/ReactiveUI.Tests/ReactiveUI.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
<None Remove="Platforms\wpf\Mocks\FakeViewWithContractLocator3.cs" />
<None Remove="Platforms\wpf\WpfGeneralFixture.cs" />
<None Remove="Platforms\wpf\WpfGeneralFixtureApp.cs" />
<None Remove="xunit.runner.json" />
</ItemGroup>
<ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<Compile Update="Platforms\Winforms\Mocks\TestForm.Designer.cs">
Expand Down
4 changes: 4 additions & 0 deletions src/ReactiveUI.Tests/xunit.runner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
"parallelAlgorithm": "aggressive"
}

0 comments on commit ebf7dcc

Please sign in to comment.