Do not wait twice at the cleanup for an assigner that ended on its own, which made the refused-start test take ten seconds a bucket

This commit is contained in:
2026-10-24 16:42:28 +02:00
parent e7a3ff1e7e
commit 55f19283f4
@@ -104,7 +104,10 @@ func (b *bed) startStoppable(t *testing.T) (<-chan error, func()) {
env := map[string]string{"MESH_BROKER_FILE": broker}
ctx, stop := context.WithCancel(b.ctx)
done := make(chan error, 1)
go func() { done <- run(ctx, func(k string) string { return env[k] }, io.Discard) }()
go func() {
done <- run(ctx, func(k string) string { return env[k] }, io.Discard)
close(done) // a program that ended on its own (a refused start) is not waited for again at the cleanup
}()
stopped := func() {
stop()
select {