aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/json
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@MIT.EDU>2013-10-24 11:19:08 -0400
committerGravatar David Bremner <david@tethera.net>2013-11-08 20:43:29 -0400
commitabeac48522ded66e2f0e9aae704482355cb46e6a (patch)
tree3f0df784ca77999c880b9000d6d4281b6b9a7143 /test/json
parent730b8f61e0cf4b2e8c0f123c0914d472d6df38fc (diff)
search: Add stable queries to thread search results
These queries will match exactly the set of messages currently in the thread, even if more messages later arrive. Two queries are provided: one for matched messages and one for unmatched messages. This can be used to fix race conditions with tagging threads from search results. While tagging based on a thread: query can affect messages that arrived after the search, tagging based on stable queries affects only the messages the user was shown in the search UI. Since we want clients to be able to depend on the presence of these queries, this ushers in schema version 2.
Diffstat (limited to 'test/json')
-rwxr-xr-xtest/json2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/json b/test/json
index b87b7f6d..e07a2904 100755
--- a/test/json
+++ b/test/json
@@ -26,6 +26,7 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\",
\"total\": 1,
\"authors\": \"Notmuch Test Suite\",
\"subject\": \"json-search-subject\",
+ \"query\": [\"id:$gen_msg_id\", null],
\"tags\": [\"inbox\",
\"unread\"]}]"
@@ -59,6 +60,7 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\",
\"total\": 1,
\"authors\": \"Notmuch Test Suite\",
\"subject\": \"json-search-utf8-body-sübjéct\",
+ \"query\": [\"id:$gen_msg_id\", null],
\"tags\": [\"inbox\",
\"unread\"]}]"