Repository navigation
Expand file tree
/
Copy pathcoverage.runsettings
More file actions
55 lines (50 loc) · 2.64 KB
/
Copy pathcoverage.runsettings
File metadata and controls
55 lines (50 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0" encoding="utf-8"?>
<!--
Coverage settings for `dotnet test` with the XPlat Code Coverage collector.
Excludes auto-generated / non-meaningfully-testable code so the reported number reflects
hand-written production logic: EF Core migrations plus the model snapshot (codegen,
executed only by Migrate), and anything marked GeneratedCode / ExcludeFromCodeCoverage.
-->
<RunSettings>
<!--
Bound VSTest containers within each invocation. At solution level the seven assemblies run
in separate MSBuild projects: CI also passes -maxcpucount:2 to dotnet test to cap those
projects. MaxCpuCount here alone does not limit that project-level concurrency.
This does not weaken the six CollectionDefinitions in the repo. Those guard process-global
state (Serilog's Log.Logger, Console.SetOut, environment variables, static hub and Quartz
slots) and xunit enforces them WITHIN an assembly. Separate processes make that isolation
stronger, not weaker.
Two, not 0 (one per core). xunit.v3 launches each assembly as its own process and gives that
process 60 seconds to answer discovery; run 33420635702 hit "Test process did not respond
within 60 seconds" on NodePilot.Data.Tests with no parallelism at all, so the four-vCPU CI
agent is already close to that limit. Saturating it would make the flake routine. Most of the
win is overlapping the six per-assembly start-ups anyway, and two lanes get that.
-->
<RunConfiguration>
<MaxCpuCount>2</MaxCpuCount>
</RunConfiguration>
<!--
The counterweight to MaxCpuCount. Each testhost otherwise spins up xunit's own thread pool
at core count, so four assemblies on a four-core agent contend for sixteen threads. The
timing-sensitive suites (retention services, FileWatcherTriggerSource with a real
FileSystemWatcher, Quartz schedule slots, WaitForConditionActivity) lose their timeouts
under that load. There is no xunit.runner.json in the repo, so xunit's default of one
thread per core would apply.
-->
<xUnit>
<maxParallelThreads>2</maxParallelThreads>
</xUnit>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="XPlat Code Coverage">
<Configuration>
<Format>cobertura</Format>
<ExcludeByAttribute>GeneratedCodeAttribute,ExcludeFromCodeCoverageAttribute,CompilerGeneratedAttribute</ExcludeByAttribute>
<ExcludeByFile>**/Migrations/*.cs</ExcludeByFile>
<SkipAutoProps>true</SkipAutoProps>
<Exclude>[*]NodePilot.Data.Migrations.*</Exclude>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>