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