[Box Backup-commit] COMMIT r1579 - box/chris/merge/test/bbackupd

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Sun, 22 Apr 2007 22:17:36 +0100


Author: chris
Date: 2007-04-22 22:17:36 +0100 (Sun, 22 Apr 2007)
New Revision: 1579

Modified:
   box/chris/merge/test/bbackupd/testbbackupd.cpp
Log:
Use wait_for_sync_end() to synchronise the test more accurately with
bbackupd, hopefully reducing random failures. (refs #3)


Modified: box/chris/merge/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/chris/merge/test/bbackupd/testbbackupd.cpp	2007-04-22 20:52:15 UTC (rev 1578)
+++ box/chris/merge/test/bbackupd/testbbackupd.cpp	2007-04-22 21:17:36 UTC (rev 1579)
@@ -1841,7 +1841,9 @@
 			TEST_THAT(::utimes("testfiles/TestDir1/sub23/rand.h", times) == 0);
 		}
 		// Wait and test
-		wait_for_backup_operation();
+		wait_for_sync_end(); // files too new
+		wait_for_sync_end(); // should (not) be backed up this time
+
 		compareReturnValue = ::system(BBACKUPQUERY " -q "
 			"-c testfiles/bbackupd.conf "
 			"-l testfiles/query3l.log "
@@ -1858,7 +1860,8 @@
 #endif
 
 		// Wait and test
-		wait_for_backup_operation();
+		wait_for_sync_end();
+		wait_for_sync_end();
 		
 		// compare with exclusions, should not find differences
 		compareReturnValue = ::system(BBACKUPQUERY " -q "