Skip to content

Commit c83ff35

Browse files
committed
feat(tests): configure xunit parallelization and timeouts
1 parent 5b030bc commit c83ff35

5 files changed

Lines changed: 28 additions & 4 deletions

File tree

src/TurboHTTP.AcceptanceTests/TurboHTTP.AcceptanceTests.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,10 @@
2121
<ProjectReference Include="..\TurboHTTP\TurboHTTP.csproj"/>
2222
</ItemGroup>
2323

24+
<ItemGroup>
25+
<Content Include="xunit.runner.json">
26+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
27+
</Content>
28+
</ItemGroup>
29+
2430
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
3+
"parallelizeTestCollections": true,
4+
"parallelizeAssembly": false,
5+
"maxParallelThreads": 4
6+
}

src/TurboHTTP.Tests/Client/NamedClientRuntimeSpec.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace TurboHTTP.Tests.Client;
77

88
public sealed class NamedClientRuntimeSpec
99
{
10-
[Fact(Timeout = 5000)]
10+
[Fact(Timeout = 15000)]
1111
public async Task CreateClient_same_name_should_reuse_single_named_runtime()
1212
{
1313
const string name = "shared-runtime";
@@ -79,7 +79,7 @@ public async Task CreateClient_concurrent_same_name_should_reuse_single_named_ru
7979
}
8080
}
8181

82-
[Fact(Timeout = 5000)]
82+
[Fact(Timeout = 15000)]
8383
public async Task CreateClient_different_names_should_not_share_named_runtime()
8484
{
8585
const string firstName = "runtime-a";
@@ -111,7 +111,7 @@ public async Task CreateClient_different_names_should_not_share_named_runtime()
111111
}
112112
}
113113

114-
[Fact(Timeout = 5000)]
114+
[Fact(Timeout = 15000)]
115115
public async Task CreateClient_shared_runtime_should_apply_named_base_address_defaults()
116116
{
117117
const string name = "named-defaults";
@@ -141,7 +141,7 @@ public async Task CreateClient_shared_runtime_should_apply_named_base_address_de
141141
}
142142
}
143143

144-
[Fact(Timeout = 5000)]
144+
[Fact(Timeout = 15000)]
145145
public async Task CreateClient_should_create_named_consumer_registration()
146146
{
147147
const string name = "registration-test";

src/TurboHTTP.Tests/TurboHTTP.Tests.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,10 @@
1818
<ProjectReference Include="..\TurboHTTP.Tests.Shared\TurboHTTP.Tests.Shared.csproj" />
1919
</ItemGroup>
2020

21+
<ItemGroup>
22+
<Content Include="xunit.runner.json">
23+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
24+
</Content>
25+
</ItemGroup>
26+
2127
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
3+
"parallelizeTestCollections": true,
4+
"parallelizeAssembly": false,
5+
"maxParallelThreads": 8
6+
}

0 commit comments

Comments
 (0)