Add missing wlocks around message delivery to account, mostly for tests.

This commit is contained in:
Mechiel Lukkien
2025-03-03 23:59:43 +01:00
parent 2da280f2bb
commit 684c716e4d
7 changed files with 50 additions and 37 deletions

View File

@ -450,8 +450,11 @@ func TestCtl(t *testing.T) {
defer msgf.Close()
_, err = msgf.Write(content)
tcheck(t, err, "write message file")
err = acc.DeliverMailbox(ctl.log, "Inbox", m, msgf)
tcheck(t, err, "deliver message")
acc.WithWLock(func() {
err = acc.DeliverMailbox(ctl.log, "Inbox", m, msgf)
tcheck(t, err, "deliver message")
})
}
var msgBadSize store.Message