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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user