From 78813b0bcfabee07996d647895b58dad364648d8 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 25 Nov 2026 18:07:51 +0100 Subject: [PATCH] P12 queue-test-waits-on-causes: the queue test waits for the restarted runner's own take-ins line and asserts no clock between restart and end Builds: design 47 H2 H-A-637 (kind), H-A-710 (rows of the runner) --- .../cmd/mesh-delivery-pipeline/queue_integration_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline/queue_integration_test.go b/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline/queue_integration_test.go index 5fda4dab6..7157363cb 100644 --- a/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline/queue_integration_test.go +++ b/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline/queue_integration_test.go @@ -384,7 +384,10 @@ func testTheQueueRunsPipelinesInTurn(t *testing.T) { t.Fatal(err) } before := pipelineKeys(t, ctx, pipelines) + heardBefore := takeInsLines(logs) stopRunner = start() + // The restarted runner is waited for by what it says it did, its own take-ins line, never by a clock (H-A-637's kind). + takeInsHeardMore(t, ctx, logs, heardBefore) outcome("main.10", seat.PipelineOutcomeRunning) waitFor(t, ctx, logs, func() bool { return wasSaid("wait-ended.main.10") && slices.Equal(running(), []string{"main.10"}) }) waitFor(t, ctx, logs, func() bool { _, ok := finding(pipeline.PipelinesStalledKind); return !ok }) @@ -417,8 +420,10 @@ func testTheQueueRunsPipelinesInTurn(t *testing.T) { restarted := time.Now() stopRunner = start() outcome("main.10", seat.PipelineOutcomeFailed) - if e := stepFor(get("main.10"), "app", seat.StepResultStepBuild).Ended; e == nil || e.Sub(restarted) >= 3*time.Second { - t.Fatalf("main.10's build ended %v, the runner restarted at %v; want its missed bound taken at the start", e, restarted) + // The missed bound is taken by the restarted runner: the step ends after the restart and the journal says so below; no + // clock between the restart and the end is asserted, which a loaded machine stretches (H-A-637's kind). + if e := stepFor(get("main.10"), "app", seat.StepResultStepBuild).Ended; e == nil || e.Before(restarted) { + t.Fatalf("main.10's build ended %v, the runner restarted at %v; want its missed bound taken by the restarted runner", e, restarted) } if !strings.Contains(logs.String(), "expired while the runner was away: taken now") { t.Fatal("the start did not say the bound it took")