[Box Backup-commit] COMMIT r2320 - box/trunk/test/bbackupd

boxbackup-dev at boxbackup.org boxbackup-dev at boxbackup.org
Sat Oct 4 16:14:21 BST 2008


Author: chris
Date: 2008-10-04 16:14:20 +0100 (Sat, 04 Oct 2008)
New Revision: 2320

Modified:
   box/trunk/test/bbackupd/testbbackupd.cpp
Log:
Fix bbackupd/housekeeping deletion test for Unix again, and hopefully
make it work on Windows too. Improve comments about this test.


Modified: box/trunk/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/trunk/test/bbackupd/testbbackupd.cpp	2008-10-03 23:23:30 UTC (rev 2319)
+++ box/trunk/test/bbackupd/testbbackupd.cpp	2008-10-04 15:14:20 UTC (rev 2320)
@@ -1407,22 +1407,15 @@
 		// d3/d4	excluded
 		// d3/d4/f5	excluded
 		// d7		deleted
-		// Careful with timing here, these files can already be
-		// deleted by housekeeping. On Win32, housekeeping runs
-		// immediately after disconnect, but only if enough time
+		// Careful with timing here, these files will be removed by
+		// housekeeping the next time it runs. On Win32, housekeeping
+		// runs immediately after disconnect, but only if enough time
 		// has elapsed since the last housekeeping. Since the
 		// backup run closely follows the last one, housekeeping
-		// should not run afterwards. By waiting before
-		// connecting to check the results, we should force
-		// housekeeping to run after that check, so the next check
-		// will see that the deleted files have been removed.
+		// should not run afterwards. On other platforms, we want to
+		// get in immediately after the backup and hope that
+		// housekeeping doesn't beat us to it.
 
-#ifndef WIN32
-		BOX_TRACE("Wait long enough that housekeeping "
-			"will run again")
-		wait_for_backup_operation(5);
-		BOX_TRACE("done.");
-
 		BOX_TRACE("Find out whether bbackupd marked files as deleted");
 		{
 			std::auto_ptr<BackupProtocolClient> client =
@@ -1454,6 +1447,7 @@
 			// these files have just been deleted, because
 			// they are excluded by the new configuration.
 			// but housekeeping should not have run yet
+
 			TEST_THAT(test_entry_deleted(*spacetest_dir, "f2"));
 			TEST_THAT(test_entry_deleted(*spacetest_dir, "d3"));
 
@@ -1494,9 +1488,7 @@
 			// stop early to make debugging easier
 			return 1;
 		}
-#endif
 
-		// Wait for housekeeping to run
 		BOX_TRACE("Wait for housekeeping to remove the deleted files");
 		wait_for_backup_operation(5);
 		BOX_TRACE("done.");




More information about the Boxbackup-commit mailing list