in more tests, after closing accounts, check the last reference is indeed gone

This commit is contained in:
Mechiel Lukkien
2024-04-16 17:33:54 +02:00
parent afc47c8108
commit abd098e8c0
13 changed files with 30 additions and 5 deletions

View File

@ -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)