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

@ -42,8 +42,11 @@ func TestThreadingUpgrade(t *testing.T) {
MsgPrefix: []byte(s),
Received: recv,
}
err = acc.DeliverMailbox(log, "Inbox", &m, f)
tcheck(t, err, "deliver")
acc.WithWLock(func() {
err = acc.DeliverMailbox(log, "Inbox", &m, f)
tcheck(t, err, "deliver")
})
if expThreadID == 0 {
expThreadID = m.ID
}