mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 07:54:40 +03:00
in more tests, after closing accounts, check the last reference is indeed gone
This commit is contained in:
@ -139,6 +139,7 @@ func (ts *testserver) close() {
|
||||
ts.switchStop()
|
||||
err := ts.acc.Close()
|
||||
tcheck(ts.t, err, "closing account")
|
||||
ts.acc.CheckClosed()
|
||||
ts.acc = nil
|
||||
}
|
||||
|
||||
@ -1367,7 +1368,10 @@ func TestCatchall(t *testing.T) {
|
||||
|
||||
acc, err := store.OpenAccount(pkglog, "catchall")
|
||||
tcheck(t, err, "open account")
|
||||
defer acc.Close()
|
||||
defer func() {
|
||||
acc.Close()
|
||||
acc.CheckClosed()
|
||||
}()
|
||||
n, err = bstore.QueryDB[store.Message](ctxbg, acc.DB).Count()
|
||||
tcheck(t, err, "checking delivered messages to catchall account")
|
||||
tcompare(t, n, 1)
|
||||
|
Reference in New Issue
Block a user