From 898400a8da4f4bb2c5ee8218fe7251a92915657f Mon Sep 17 00:00:00 2001 From: meisa Date: Sat, 5 Sep 2026 15:31:33 +0200 Subject: [PATCH 1/3] Align local release validation with explicit test suites --- eng/package-release-dry-run.ps1 | 14 ++++++------- .../PackageReleaseDryRunScriptTests.cs | 21 +++++++++++++++++++ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/eng/package-release-dry-run.ps1 b/eng/package-release-dry-run.ps1 index 50733cba..e1451531 100644 --- a/eng/package-release-dry-run.ps1 +++ b/eng/package-release-dry-run.ps1 @@ -92,6 +92,7 @@ $resolverPath = Join-Path $repoRoot "eng/resolve-package-release.ps1" $archiveInspectorPath = Join-Path $repoRoot "eng/package-archive-inspect.ps1" $consumerSmokePath = Join-Path $repoRoot "eng/package-consumer-smoke.ps1" $feedVerifyPath = Join-Path $repoRoot "eng/package-feed-verify.ps1" +$testRunnerPath = Join-Path $repoRoot "eng/test.ps1" try { $resolveArgs = @{ @@ -133,13 +134,12 @@ try { "--no-restore", "-p:ContinuousIntegrationBuild=true" ) "Solution build failed." - Invoke-Step "dotnet" @( - "test", - "FluxFlow.sln", - "--configuration", - $Configuration, - "--no-build" - ) "Solution tests failed." + foreach ($suite in @("Unit", "Acceptance", "Integration")) { + & $testRunnerPath -Suite $suite -Configuration $Configuration -NoBuild + if ($LASTEXITCODE -ne 0) { + throw "$suite tests failed." + } + } } $stalePackagePattern = "^$([regex]::Escape($packageId))\.\d[^/\\]*\.s?nupkg$" diff --git a/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageReleaseDryRunScriptTests.cs b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageReleaseDryRunScriptTests.cs index 0b1911f8..df4b17ff 100644 --- a/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageReleaseDryRunScriptTests.cs +++ b/tests/Unit/Infrastructure/Release/FluxFlow.Release.Tests/PackageReleaseDryRunScriptTests.cs @@ -7,6 +7,27 @@ namespace FluxFlow.Release.Tests; [Collection(ReleaseProcessCollection.Name)] public sealed class PackageReleaseDryRunScriptTests { + [Fact] + public void Release_dry_run_uses_explicit_suites_before_packing() + { + var root = ReleaseTestPaths.FindRepositoryRoot(); + var script = File.ReadAllText(Path.Combine(root, "eng", "package-release-dry-run.ps1")); + var buildStart = script.IndexOf("if (-not $SkipSolutionBuild)", StringComparison.Ordinal); + var packStart = script.IndexOf("$stalePackagePattern =", StringComparison.Ordinal); + buildStart.ShouldBeGreaterThanOrEqualTo(0); + packStart.ShouldBeGreaterThan(buildStart); + var validation = script[buildStart..packStart]; + + validation.ShouldContain("foreach ($suite in @(\"Unit\", \"Acceptance\", \"Integration\"))"); + validation.ShouldContain("& $testRunnerPath -Suite $suite -Configuration $Configuration -NoBuild"); + validation.ShouldContain("if ($LASTEXITCODE -ne 0)"); + validation.ShouldContain("throw \"$suite tests failed.\""); + validation.ShouldNotContain("\"test\""); + validation.ShouldNotContain("-IncludeLicensedDatabaseTests"); + validation.ShouldNotContain("\"Smoke\""); + script.ShouldContain("$testRunnerPath = Join-Path $repoRoot \"eng/test.ps1\""); + } + [Fact] public async Task Release_dry_run_script_prepares_resolved_package() { From ba34be547f1fbdba8420c4a3b5a9096c01044ccb Mon Sep 17 00:00:00 2001 From: meisa Date: Sat, 5 Sep 2026 15:37:18 +0200 Subject: [PATCH 2/3] Assert propagated HTTP faults independent of aggregate wrapping --- .../HttpTriggerEndpointTests.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/Unit/Components/Http/FluxFlow.Components.Http.AspNetCore.Tests/HttpTriggerEndpointTests.cs b/tests/Unit/Components/Http/FluxFlow.Components.Http.AspNetCore.Tests/HttpTriggerEndpointTests.cs index 56bf524b..f94c0c77 100644 --- a/tests/Unit/Components/Http/FluxFlow.Components.Http.AspNetCore.Tests/HttpTriggerEndpointTests.cs +++ b/tests/Unit/Components/Http/FluxFlow.Components.Http.AspNetCore.Tests/HttpTriggerEndpointTests.cs @@ -49,9 +49,14 @@ public async Task TriggerNode_IsAFlowNode_WithPropagatingFault() // The trigger is a first-class node: it carries the uniform lifecycle contract. node.ShouldBeAssignableTo(); - node.Fault(new InvalidOperationException("boom")); - await Should.ThrowAsync( + var fault = new InvalidOperationException("boom"); + node.Fault(fault); + var observed = await Record.ExceptionAsync( () => node.Completion.WaitAsync(TimeSpan.FromSeconds(30))); + + observed.ShouldNotBeNull(); + node.Completion.IsFaulted.ShouldBeTrue(); + node.Completion.Exception!.Flatten().InnerExceptions.ShouldContain(fault); } [Fact] From e36f514df097849e9801b186375472c92551c887 Mon Sep 17 00:00:00 2001 From: meisa Date: Sat, 5 Sep 2026 15:43:43 +0200 Subject: [PATCH 3/3] Register request output receivers before test publication --- .../RequestReplyCoordinatorTests.cs | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/tests/Unit/Components/RequestReply/FluxFlow.Components.RequestReply.Tests/RequestReplyCoordinatorTests.cs b/tests/Unit/Components/RequestReply/FluxFlow.Components.RequestReply.Tests/RequestReplyCoordinatorTests.cs index f8b9fac4..de77bb3e 100644 --- a/tests/Unit/Components/RequestReply/FluxFlow.Components.RequestReply.Tests/RequestReplyCoordinatorTests.cs +++ b/tests/Unit/Components/RequestReply/FluxFlow.Components.RequestReply.Tests/RequestReplyCoordinatorTests.cs @@ -15,9 +15,10 @@ public async Task Request_FlowsToOutput_WithMintedCorrelationId() await using var bridge = new RequestReplyCoordinator(); var context = new FakeContext("ping"); + var receive = bridge.Output.ReceiveAsync(); await bridge.Incoming.SendAsync(context); - var request = await bridge.Output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); + var request = await receive.WaitAsync(TimeSpan.FromSeconds(30)); request.Value.ShouldBe("ping"); request.CorrelationId.HasValue.ShouldBeTrue(); request.CorrelationId.Value.IsEmpty.ShouldBeFalse(); @@ -71,9 +72,10 @@ public async Task HostSuppliedCorrelationId_IsHonoured() { await using var bridge = new RequestReplyCoordinator(); var id = new CorrelationId("trace-7"); + var receive = bridge.Output.ReceiveAsync(); await bridge.Incoming.SendAsync(new FakeContext("ping", id)); - (await bridge.Output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30))).CorrelationId.ShouldBe(id); + (await receive.WaitAsync(TimeSpan.FromSeconds(30))).CorrelationId.ShouldBe(id); } [Fact] @@ -81,9 +83,10 @@ public async Task Response_RepliesToContext_AndEvicts() { await using var bridge = new RequestReplyCoordinator(); var context = new FakeContext("hello"); + var receive = bridge.Output.ReceiveAsync(); await bridge.Incoming.SendAsync(context); - var request = await bridge.Output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); + var request = await receive.WaitAsync(TimeSpan.FromSeconds(30)); await bridge.Responses.SendAsync(request.With("world")); await context.Settled.WaitAsync(TimeSpan.FromSeconds(30)); @@ -99,8 +102,9 @@ public async Task RequestReplyMode_EmitsPublishedEventAfterRequestReachesOutput( var events = Sink(bridge.Events); var context = new FakeContext("hello"); + var receive = bridge.Output.ReceiveAsync(); await bridge.Incoming.SendAsync(context); - var request = await bridge.Output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); + var request = await receive.WaitAsync(TimeSpan.FromSeconds(30)); await bridge.Responses.SendAsync(request.With("world")); await context.Settled.WaitAsync(TimeSpan.FromSeconds(30)); @@ -144,8 +148,9 @@ public async Task Timeout_FailsContext_AndEvicts() }, clock); var context = new FakeContext("slow"); + var receive = bridge.Output.ReceiveAsync(); await bridge.Incoming.SendAsync(context); - await bridge.Output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); // now in-flight + await receive.WaitAsync(TimeSpan.FromSeconds(30)); // now in-flight clock.Advance(TimeSpan.FromMilliseconds(350)); // past deadline; fires a sweep @@ -184,9 +189,10 @@ public async Task NullRequestContext_ReportsError_AndContinues() flowEvent.ToFlowEvent().Level.ShouldBe(FlowEventLevel.Error); var context = new FakeContext("valid"); + var receive = bridge.Output.ReceiveAsync(); await bridge.Incoming.SendAsync(context); - var request = await bridge.Output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); + var request = await receive.WaitAsync(TimeSpan.FromSeconds(30)); request.Value.ShouldBe("valid"); await bridge.Responses.SendAsync(request.With("ok")); await context.Settled.WaitAsync(TimeSpan.FromSeconds(30)); @@ -209,8 +215,9 @@ public async Task NullResponseMessage_ReportsError_AndContinues() flowEvent.ToFlowEvent().Level.ShouldBe(FlowEventLevel.Error); var context = new FakeContext("valid"); + var receive = bridge.Output.ReceiveAsync(); await bridge.Incoming.SendAsync(context); - var request = await bridge.Output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); + var request = await receive.WaitAsync(TimeSpan.FromSeconds(30)); await bridge.Responses.SendAsync(request.With("ok")); await context.Settled.WaitAsync(TimeSpan.FromSeconds(30)); @@ -249,8 +256,9 @@ public async Task Complete_FailsInFlightCallers_AndSettlesCompletion() { await using var bridge = new RequestReplyCoordinator(); var context = new FakeContext("pending"); + var receive = bridge.Output.ReceiveAsync(); await bridge.Incoming.SendAsync(context); - await bridge.Output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); + await receive.WaitAsync(TimeSpan.FromSeconds(30)); bridge.Complete(); @@ -265,8 +273,9 @@ public async Task DisposeAsync_FailsInFlightCallers_AndSettlesCompletion() { var bridge = new RequestReplyCoordinator(); var context = new FakeContext("pending"); + var receive = bridge.Output.ReceiveAsync(); await bridge.Incoming.SendAsync(context); - await bridge.Output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); + await receive.WaitAsync(TimeSpan.FromSeconds(30)); await bridge.DisposeAsync(); @@ -339,10 +348,11 @@ public async Task FireAndForget_PublishesThenAcknowledges_WithoutHoldingInFlight new RequestReplyOptions { Mode = RequestReplyMode.FireAndForget }); var context = new FakeContext("ingest"); + var receive = bridge.Output.ReceiveAsync(); await bridge.Incoming.SendAsync(context); // The request is published into the graph... - var request = await bridge.Output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); + var request = await receive.WaitAsync(TimeSpan.FromSeconds(30)); request.Value.ShouldBe("ingest"); request.CorrelationId.HasValue.ShouldBeTrue(); request.CorrelationId.Value.IsEmpty.ShouldBeFalse(); @@ -362,8 +372,9 @@ public async Task FireAndForget_IgnoresLateResponses() new RequestReplyOptions { Mode = RequestReplyMode.FireAndForget }); var events = Sink(bridge.Events); var context = new FakeContext("ingest"); + var receive = bridge.Output.ReceiveAsync(); await bridge.Incoming.SendAsync(context); - var request = await bridge.Output.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(30)); + var request = await receive.WaitAsync(TimeSpan.FromSeconds(30)); // A response for a fire-and-forget request has nothing to match; it is reported // unmatched like any orphan rather than replying to the (already-acked) caller.