astroidmail / astroid

A graphical threads-with-tags style, lightweight and fast, e-mail client for Notmuch
http://astroidmail.github.io
Other
613 stars 65 forks source link

ctest pollutes my actual notmuch database ! #760

Open xunam opened 2 weeks ago

xunam commented 2 weeks ago

Hello,

I just tried compiling Astroid from source fetched from the Github repository's master branch. After installing all dependencies, everything compiled fine, except that there was a significant number of warnings related to deprecated functions in Webkit, Notmuch and Boost. Then I run ctest as suggested in the readme, and things went wrong.

It seems that the test suite attempted to make a Notmuch database for testing purposes and used my actual database instead. Indeed, the test launched a notmuch new that ran for several minutes before I killed it. Then my inbox (open in another client independently) suddenly contained 11 new messages (with dates from 2009 to 2016). A notmuch search --output=files tag:inbox showed messages like

/home/manu/mail/multipart.eml
/home/manu/mail/only-html.eml
...

Of course these files do not exist in this place (they are part of the test suite) but they appear in my index anyway. So I ran notmuch new, hoping that they would disappear, as happens when mails are deleted. What happened instead is that notmuch apparently scanned by whole mail folder (it took 7 minutes to complete) and eventually said No new mail. without removing the non-existent messages. Additional runs of notmuch new run instantaneously but changed nothing.

After looking around a bit, it seems that none of my real messages were affected, yet these extra test messages persist in my index and I don't know how to get rid of them.

Anyway, this interference between test and user database is very problematic.

I don't know how to diagnose the issue further (I am a seasoned notmuch user and hacker but completely new to Astroid). I have NOTMUCH_CONFIG and NOTMUCH_DATABASE set explicitly in my .profile, plus an explicit database.path in my config, if that changes anything.

What can I do to (1) get rid of those spurious messages and (2) help fix the issue ?

Thanks !