fix: keep cancellation pending until execution cleanup is confirmed

This commit is contained in:
2026-10-20 15:47:07 +01:00
parent 1cf5156c77
commit b96b9d94a6
26 changed files with 690 additions and 142 deletions
+12 -2
View File
@@ -135,7 +135,12 @@ func TestHandlerWiresRunTitleGenerator(t *testing.T) {
}
defer store.Close()
configured := HandlerWithOptions(ctx, Options{RunTitles: summarise.GenerateTitle}, store).(*runHandler)
bare := HandlerWithOptions(ctx, Options{}, store).(*runHandler)
bareStore, err := pipeline.Open(filepath.Join(t.TempDir(), "bare.db"))
if err != nil {
t.Fatal(err)
}
defer bareStore.Close()
bare := HandlerWithOptions(ctx, Options{}, bareStore).(*runHandler)
defer func() { cancel(); WaitRuns(configured); WaitRuns(bare) }()
if configured.runner.title == nil {
t.Fatal("configured RunTitles was not applied to the runner")
@@ -461,7 +466,12 @@ func TestHandlerWiresStepVerdictGenerator(t *testing.T) {
}
defer store.Close()
configured := HandlerWithOptions(ctx, Options{StepVerdicts: summarise.GenerateVerdictReason}, store).(*runHandler)
bare := HandlerWithOptions(ctx, Options{}, store).(*runHandler)
bareStore, err := pipeline.Open(filepath.Join(t.TempDir(), "bare.db"))
if err != nil {
t.Fatal(err)
}
defer bareStore.Close()
bare := HandlerWithOptions(ctx, Options{}, bareStore).(*runHandler)
defer func() { cancel(); WaitRuns(configured); WaitRuns(bare) }()
if configured.runner.verdict == nil {
t.Fatal("configured StepVerdicts was not applied to the runner")