aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@MIT.EDU>2013-10-24 11:19:11 -0400
committerGravatar David Bremner <david@tethera.net>2013-11-08 20:52:00 -0400
commit96c0ce28f8288773870bff5a6ef1c43ff3a931f8 (patch)
treee73cb062ce08cee5557e1a7f3e7a46f71581097d /test
parent23fb842e04938513517adfed860d8b40ad910096 (diff)
emacs: Fix search tagging races
This fixes races in thread-local and global tagging in notmuch-search (e.g., "+", "-", "a", "*", etc.). Previously, these would modify tags of new messages that arrived after the search. Now they only operate on the messages that were in the threads when the search was performed. This prevents surprises like archiving messages that arrived in a thread after the search results were shown. This eliminates `notmuch-search-find-thread-id-region(-search)' because these functions strongly encouraged racy usage. This fixes the two broken tests added by the previous patch.
Diffstat (limited to 'test')
-rwxr-xr-xtest/emacs4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/emacs b/test/emacs
index 7503e962..3b3b14d7 100755
--- a/test/emacs
+++ b/test/emacs
@@ -889,7 +889,7 @@ $PWD/notmuch_fail exited with status 1 (see *Notmuch errors* for more details)
---
[XXX]
$PWD/notmuch_fail exited with status 1
-command: $PWD/notmuch_fail search --format\=sexp --format-version\=1 --sort\=newest-first tag\:inbox
+command: $PWD/notmuch_fail search --format\=sexp --format-version\=2 --sort\=newest-first tag\:inbox
exit status: 1"
test_begin_subtest "Search handles subprocess warnings"
@@ -923,7 +923,6 @@ This is a warning
This is another warning"
test_begin_subtest "Search thread tag operations are race-free"
-test_subtest_known_broken
add_message '[subject]="Search race test"'
gen_msg_id_1=$gen_msg_id
generate_message '[in-reply-to]="<'$gen_msg_id_1'>"' \
@@ -937,7 +936,6 @@ output=$(notmuch search --output=messages 'tag:search-thread-race-tag')
test_expect_equal "$output" "id:$gen_msg_id_1"
test_begin_subtest "Search global tag operations are race-free"
-test_subtest_known_broken
generate_message '[in-reply-to]="<'$gen_msg_id_1'>"' \
'[references]="<'$gen_msg_id_1'>"' \
'[subject]="Re: Search race test"'