Skip to content

Commit fee701f

Browse files
authored
Merge branch 'main' into fase-7/dependabot-types-node
2 parents a8e88c5 + 410e09a commit fee701f

6 files changed

Lines changed: 18 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,16 @@ jobs:
7979
# Testcontainers (Docker); GitHub's Windows runners cannot run Linux containers, so Windows runs the Core tests only.
8080
- name: Test
8181
if: runner.os == 'Linux'
82-
run: dotnet test --no-build --configuration Release --solution tests/PythonScriptRunner.SemE2E.slnf
82+
run: dotnet test --no-build --configuration Release --solution tests/PythonScriptRunner.SemE2E.slnf --filter-not-trait "Category=Timing"
83+
84+
# The tests that assert a duration (timeout, cancellation, latency, p95) run alone and one at a time: next to the
85+
# other test projects, the runner's shared CPU made them miss their limits by a few milliseconds (D-188).
86+
- name: Test (timing)
87+
if: runner.os == 'Linux'
88+
run: |
89+
for project in Core Dashboard Worker; do
90+
dotnet test --no-build --configuration Release --project "tests/PythonScriptRunner.$project.Tests" --filter-trait "Category=Timing" --parallel none
91+
done
8392
8493
# The panel E2E tests run alone: containers starting or stopping in the other test projects change the host's network
8594
# interfaces, and Chromium then aborts requests in flight with ERR_NETWORK_CHANGED.

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ A pull request is merged only when every job of `.github/workflows/ci.yml` is gr
4848
## Conventions
4949

5050
- **Tests:** every acceptance criterion and every fixed bug has a test. Integration tests run against real Python (uv),
51-
PostgreSQL and RabbitMQ (Testcontainers).
51+
PostgreSQL and RabbitMQ (Testcontainers). A test that asserts a duration gets `[Trait("Category", "Timing")]`: the CI
52+
runs those alone, one at a time (`--filter-trait "Category=Timing" --parallel none`).
5253
- **Public API:** public types and members have XML documentation (the build generates it and fails on warnings).
5354
- **Packages:** versions live in `Directory.Packages.props` (Central Package Management). Dependabot proposes updates
5455
every Monday.

‎tests/PythonScriptRunner.Core.Tests/Integration/IsolationTests.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace PythonScriptRunner.Core.Tests.Integration;
88
public sealed class IsolationTests(PythonFixture fixture)
99
{
1010
[Fact]
11+
[Trait("Category", "Timing")]
1112
public async Task Spec001_AC07_Timeout_KillsTheProcessTree()
1213
{
1314
// Arrange
@@ -44,6 +45,7 @@ with open(inputs["pid_file"], "w") as f:
4445
}
4546

4647
[Fact]
48+
[Trait("Category", "Timing")]
4749
public async Task Spec001_AC08_Cancellation_StopsTheRun()
4850
{
4951
await using var host = RunnerHost.Create(fixture, b => b.AddStage("espera", s => s.Script("""

‎tests/PythonScriptRunner.Dashboard.Tests/PerformanceTests.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public sealed class PerformanceTests(PostgresFixture postgres, BrokerFixture bro
1616
private static CancellationToken Ct => TestContext.Current.CancellationToken;
1717

1818
[Fact]
19+
[Trait("Category", "Timing")]
1920
public async Task Spec007_AC13_MainReadsWith90DaysOfRuns_AnswerWithP95Under500Ms()
2021
{
2122
var perDay = int.TryParse(Environment.GetEnvironmentVariable("PSR_PERF_RUNS_PER_DAY"), CultureInfo.InvariantCulture, out var configured)

‎tests/PythonScriptRunner.Dashboard.Tests/RealtimeTests.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public sealed class RealtimeTests(PostgresFixture postgres, BrokerFixture broker
1414
private static CancellationToken Ct => TestContext.Current.CancellationToken;
1515

1616
[Fact]
17+
[Trait("Category", "Timing")]
1718
public async Task Spec007_AC11_SubscribedClientsOfTwoInstances_ReceiveStepAndRunUpdatesInUnderOneSecond()
1819
{
1920
await using var env = await PsrEnvironment.CreateAsync(postgres, broker, python);

‎tests/PythonScriptRunner.Worker.Tests/RecoveryTests.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public sealed class RecoveryTests(PostgresFixture postgres, BrokerFixture broker
1010
private static CancellationToken Ct => TestContext.Current.CancellationToken;
1111

1212
[Fact]
13+
[Trait("Category", "Timing")]
1314
public async Task Spec006_AC05_LostWorker_IdempotentStepIsRecoveredByAnother()
1415
{
1516
await using var env = await PsrEnvironment.CreateAsync(postgres, broker, python);
@@ -49,6 +50,7 @@ public async Task Spec006_AC06_LostWorker_NonIdempotentStepFailsAndReprocessComp
4950
}
5051

5152
[Fact]
53+
[Trait("Category", "Timing")]
5254
public async Task Spec006_AC09_Cancel_StopsTheProcessInTheWorker()
5355
{
5456
await using var env = await PsrEnvironment.CreateAsync(postgres, broker, python);

0 commit comments

Comments
 (0)