fix race in test setup/teardown

not easily triggered, but it happened just now on a build server.
This commit is contained in:
Mechiel Lukkien
2023-08-07 23:14:31 +02:00
parent 849b4ec9e9
commit 49cf16d3f2
15 changed files with 29 additions and 36 deletions

View File

@ -38,8 +38,7 @@ func TestCtl(t *testing.T) {
if errs := mox.LoadConfig(ctxbg, true, false); len(errs) > 0 {
t.Fatalf("loading mox config: %v", errs)
}
switchDone := store.Switchboard()
defer close(switchDone)
defer store.Switchboard()()
xlog := mlog.New("ctl")