fix: kill should result in Start returning an error

This fixes Kill resulting in a final nil model being returned.

We can also drop the kill channel and rely on our existing context
channel.
This commit is contained in:
Christian Muehlhaeuser
2022-10-07 23:20:58 +02:00
parent fd18c149df
commit 1ed623fdc0
2 changed files with 20 additions and 15 deletions

View File

@@ -92,8 +92,8 @@ func TestTeaKill(t *testing.T) {
}
}()
if _, err := p.Run(); err != nil {
t.Fatal(err)
if _, err := p.Run(); err != ErrProgramKilled {
t.Fatalf("Expected %v, got %v", ErrProgramKilled, err)
}
}