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")