From 16cb874cccf65a1db317590d989b7540a2c39fe7 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 17 Nov 2026 13:10:25 +0100 Subject: [PATCH] watchman: the integration test proves the end of a run's ask begins a test step's clock again (W1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Builds: design 47 G-24 §732, §733 (watchman case) --- .../cmd/mesh-delivery-watchman/integration_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/mesh-delivery-watchman/cmd/mesh-delivery-watchman/integration_test.go b/modules/mesh-delivery-watchman/cmd/mesh-delivery-watchman/integration_test.go index 68fed8d9..bab80b58 100644 --- a/modules/mesh-delivery-watchman/cmd/mesh-delivery-watchman/integration_test.go +++ b/modules/mesh-delivery-watchman/cmd/mesh-delivery-watchman/integration_test.go @@ -369,16 +369,18 @@ func TestWatchmanWhole(t *testing.T) { // 1135/AC8 } // A test step whose run's ask ended with no step-ended of its own stands five minutes (here the short bound) after that end. const runAsk = "run-ask-2" - testStep, _ := json.Marshal(meshpipelinerunner.StepEvent{Pipeline: "main.6.web", Branch: "main", Module: "web", Commit: "c2", + old := time.Now().UTC().Add(-time.Minute) // started longer ago than the short bound: it stands at once + testStep, _ := json.Marshal(meshpipelinerunner.StepEvent{Pipeline: "main.6.web", Branch: "main", Module: "web", Commit: "c2", At: &old, Result: meshpipelinerunner.StepResult{Step: "unit", Artifact: "web:program", Ask: "t-ask", Outcome: meshpipelinerunner.StepResultOutcomeRunning, Shared: []meshpipelinerunner.Shared{{Run: "r2", Ask: runAsk}}}}) if _, err := js.Publish(ctx, "mesh.seat.mesh-pipeline-runner.event.step-started.web.main.c2", testStep); err != nil { t.Fatal(err) } + testFinding := watch.FindingKey(watch.ScopeDelivery, watch.StepFindingID("main.6.web/unit/web:program"), watch.KindPipelineStands) + until("the test step standing since its old start", func() bool { return finding(testFinding) }) sayAsk(t, ctx, js, "step-ended", runAsk) - until("the test step whose run ended with no end of its own", func() bool { - return finding(watch.FindingKey(watch.ScopeDelivery, watch.StepFindingID("main.6.web/unit/web:program"), watch.KindPipelineStands)) - }) + until("the end of the run's ask begins the clock again, so the finding is cleared", func() bool { return !finding(testFinding) }) + until("the test step whose run ended with no end of its own, one bound after that end", func() bool { return finding(testFinding) }) // A-274: the finding is said under the watchman's binding finding-events. until("a finding-written under the binding finding-events", func() bool { st, err := js.Stream(ctx, "WATCHMAN_FINDINGS")