mirror of
https://github.com/mjl-/mox.git
synced 2025-07-13 00:54:38 +03:00
in more tests, after closing accounts, check the last reference is indeed gone
This commit is contained in:
@ -69,7 +69,10 @@ func FuzzServer(f *testing.F) {
|
||||
if err != nil {
|
||||
f.Fatalf("open account: %v", err)
|
||||
}
|
||||
defer acc.Close()
|
||||
defer func() {
|
||||
acc.Close()
|
||||
acc.CheckClosed()
|
||||
}()
|
||||
err = acc.SetPassword(log, password0)
|
||||
if err != nil {
|
||||
f.Fatalf("set password: %v", err)
|
||||
|
@ -310,6 +310,7 @@ func (tc *testconn) close() {
|
||||
}
|
||||
err := tc.account.Close()
|
||||
tc.check(err, "close account")
|
||||
// no account.CheckClosed(), the tests open accounts multiple times.
|
||||
tc.account = nil
|
||||
tc.client.Close()
|
||||
tc.serverConn.Close()
|
||||
|
Reference in New Issue
Block a user