]> git.notmuchmail.org Git - notmuch/commit
test: change database from within pre-new hook
authorMichael J Gruber <git@grubix.eu>
Tue, 11 May 2021 20:48:52 +0000 (22:48 +0200)
committerDavid Bremner <david@tethera.net>
Wed, 12 May 2021 11:34:34 +0000 (08:34 -0300)
commit0729c4e81f094eb6c81ba7c4287d90726c89d619
treee59e1c3cc7399320305754c699f548e4fecd86d9
parent5ebbf17242522e3a00d7f084f0ddfc86b0611825
test: change database from within pre-new hook

Due to the change in the config system, notmuch keeps a notmuch database
open when it would not do so before. Consequently, it can miss changes
to the database which are done from a hook (while notmuch holds the
databse in read only mode). When notmuch itself writes to the database
after that it uses wrong assumptions about the last used doc id etc.

Demonstrate this by triggering an assertion. (This new test succeeds
with notmuch 0.31.4.)

Signed-off-by: Michael J Gruber <git@grubix.eu>
Amended-by: db. Check for both messages
test/T400-hooks.sh