]> git.notmuchmail.org Git - notmuch/commitdiff
test: Use increment_mtime rather than sleep
authorCarl Worth <cworth@cworth.org>
Wed, 29 Jun 2011 21:11:38 +0000 (14:11 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 29 Jun 2011 21:11:38 +0000 (14:11 -0700)
The sleep was to force the directory's mtime to advance between the
previous notmuch new and the subsequent rm;notmuch new.

The current convention is to use the existing increment_mtime function
for this purpose, (which avoids the test suite being slowed down by
calls to sleep).

Thanks to Austin Clements for noticing this undesired sleep.

test/search-folder-coherence

index cf3ba40da7bb44121cc41b371d67d68848490c5d..9c312542a33283f3e6c75c4298907f95992da1c8 100755 (executable)
@@ -34,10 +34,9 @@ test_begin_subtest "Test matches folder:spam"
 output=$(notmuch search folder:spam)
 test_expect_equal "$output" "thread:0000000000000001   2001-01-05 [1/1] Notmuch Test Suite; Test message #1 (inbox unread)"
 
-sleep 1;
-
 test_begin_subtest "Remove folder:spam copy of email"
 rm $dir/spam/$(basename $file_x)
+increment_mtime $dir/spam
 output=$(NOTMUCH_NEW)
 test_expect_equal "$output" "No new mail. Detected 1 file rename."