in queue.Drop, to drop a message from the outgoing queue, not only remove it from the database, but also its contents from the file system

This commit is contained in:
Mechiel Lukkien
2023-05-22 15:03:23 +02:00
parent 88fd775ec4
commit b0623e6038
2 changed files with 12 additions and 1 deletions

View File

@ -102,6 +102,9 @@ func TestQueue(t *testing.T) {
if n != 1 {
t.Fatalf("dropped %d, expected 1", n)
}
if _, err := os.Stat(msgs[1].MessagePath()); err == nil || !os.IsNotExist(err) {
t.Fatalf("dropped message not removed from file system")
}
next := nextWork(ctxbg, nil)
if next > 0 {