Skip to content

Commit adab072

Browse files
committed
No parallel test execution in Build.ps1
Parallel execution of DB tests on the one single local DB led to concurrency problems. Therefore the script now runs tests for each supported target framework in a separate call, avoiding parallelism of the DB tests.
1 parent 71ca19a commit adab072

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Build.ps1

+9-5
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,17 @@ try
7171
{
7272
Push-Location "$testProjectPath"
7373

74-
echo "build: Testing project in $testProjectPath"
75-
& dotnet test -c Release --collect "XPlat Code Coverage"
76-
if ($LASTEXITCODE -ne 0)
74+
# Run tests for different targets in sequence to avoid database tests
75+
# to fail because of concurrency problems
76+
foreach ($tfm in @( "net462", "net472", "net8.0" ))
7777
{
78-
exit 2
78+
echo "build: Testing project in $testProjectPath for target $tfm"
79+
& dotnet test -c Release --collect "XPlat Code Coverage" --framework "$tfm" --results-directory "./TestResults/$tfm"
80+
if ($LASTEXITCODE -ne 0)
81+
{
82+
exit 2
83+
}
7984
}
80-
8185
}
8286
finally
8387
{

0 commit comments

Comments
 (0)