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

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sat Apr 21 12:43:58 BST 2007


Author: chris
Date: 2007-04-21 12:43:58 +0100 (Sat, 21 Apr 2007)
New Revision: 1539

Modified:
   box/chris/merge/test/bbackupd/testbbackupd.cpp
Log:
Enhance test for bbackupd pausing on change of client store marker
(refs #3)


Modified: box/chris/merge/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/chris/merge/test/bbackupd/testbbackupd.cpp	2007-04-21 11:36:57 UTC (rev 1538)
+++ box/chris/merge/test/bbackupd/testbbackupd.cpp	2007-04-21 11:43:58 UTC (rev 1539)
@@ -1179,9 +1179,30 @@
 			"testfiles/0_1/backup/01234567/info.rf") == 0);
 		TEST_THAT(::rename("testfiles/0_2/backup/01234567/info.rf.bak",
 			"testfiles/0_2/backup/01234567/info.rf") == 0);
-		// wait until bbackupd recovers from the exception
+	
+		// Check that we DO get errors on compare
+		compareReturnValue = ::system(BBACKUPQUERY " -q "
+			"-c testfiles/bbackupd.conf "
+			"-l testfiles/query3b.log "
+			"\"compare -acQ\" quit");
+		TEST_RETURN(compareReturnValue, 2);
+		TestRemoteProcessMemLeaks("bbackupquery.memleaks");		
+
+		// Wait until bbackupd recovers from the exception
 		wait_for_backup_operation(100);
 
+		// Ensure that the force-upload file gets uploaded,
+		// meaning that bbackupd recovered
+		sync_and_wait();
+
+		// Check that it did get uploaded, and we have no more errors
+		compareReturnValue = ::system(BBACKUPQUERY " -q "
+			"-c testfiles/bbackupd.conf "
+			"-l testfiles/query3b.log "
+			"\"compare -acQ\" quit");
+		TEST_RETURN(compareReturnValue, 1);
+		TestRemoteProcessMemLeaks("bbackupquery.memleaks");		
+
 		// Bad case: delete a file/symlink, replace it with a directory
 		printf("Replace symlink with directory, add new directory\n");
 #ifndef WIN32




More information about the Boxbackup-commit mailing list