watchman: the integration test proves the end of a run's ask begins a test step's clock again (W1)

Builds: design 47 G-24 §732, §733 (watchman case)
This commit is contained in:
2026-11-17 13:10:25 +01:00
parent 5b8fa23a8d
commit 16cb874ccc
@@ -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. // 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" 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, Result: meshpipelinerunner.StepResult{Step: "unit", Artifact: "web:program", Ask: "t-ask", Outcome: meshpipelinerunner.StepResultOutcomeRunning,
Shared: []meshpipelinerunner.Shared{{Run: "r2", Ask: runAsk}}}}) 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 { if _, err := js.Publish(ctx, "mesh.seat.mesh-pipeline-runner.event.step-started.web.main.c2", testStep); err != nil {
t.Fatal(err) 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) sayAsk(t, ctx, js, "step-ended", runAsk)
until("the test step whose run ended with no end of its own", func() bool { until("the end of the run's ask begins the clock again, so the finding is cleared", func() bool { return !finding(testFinding) })
return finding(watch.FindingKey(watch.ScopeDelivery, watch.StepFindingID("main.6.web/unit/web:program"), watch.KindPipelineStands)) 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. // A-274: the finding is said under the watchman's binding finding-events.
until("a finding-written under the binding finding-events", func() bool { until("a finding-written under the binding finding-events", func() bool {
st, err := js.Stream(ctx, "WATCHMAN_FINDINGS") st, err := js.Stream(ctx, "WATCHMAN_FINDINGS")