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

boxbackup-dev at boxbackup.org boxbackup-dev at boxbackup.org
Wed Oct 29 20:57:11 GMT 2008


Author: chris
Date: 2008-10-29 20:57:11 +0000 (Wed, 29 Oct 2008)
New Revision: 2370

Modified:
   box/trunk/test/bbackupd/testbbackupd.cpp
Log:
Revert incorrectly committed file.


Modified: box/trunk/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/trunk/test/bbackupd/testbbackupd.cpp	2008-10-29 20:55:43 UTC (rev 2369)
+++ box/trunk/test/bbackupd/testbbackupd.cpp	2008-10-29 20:57:11 UTC (rev 2370)
@@ -1002,27 +1002,22 @@
 		// before any matching blocks could be found.
 		intercept_setup_delay("testfiles/TestDir1/spacetest/f1", 
 			0, 4000, SYS_read, 1);
-		{
-			Timers::Init();
-			BackupDaemon bbackupd;
-			bbackupd.Configure("testfiles/bbackupd.conf");
-			bbackupd.InitCrypto();
+		pid = start_internal_daemon();
+		intercept_clear_setup();
 		
-			fd = open("testfiles/TestDir1/spacetest/f1", O_WRONLY);
-			TEST_THAT(fd > 0);
-			// write again, to update the file's timestamp
-			TEST_EQUAL(1, write(fd, "z", 1), "Buffer write");
-			TEST_THAT(close(fd) == 0);
+		fd = open("testfiles/TestDir1/spacetest/f1", O_WRONLY);
+		TEST_THAT(fd > 0);
+		// write again, to update the file's timestamp
+		TEST_EQUAL(sizeof(buffer), write(fd, buffer, sizeof(buffer)),
+			"Buffer write");
+		TEST_THAT(close(fd) == 0);	
 
-			// wait long enough to put file into sync window
-			wait_for_operation(5);
+		wait_for_backup_operation();
+		// can't test whether intercept was triggered, because
+		// it's in a different process.
+		// TEST_THAT(intercept_triggered());
+		TEST_THAT(stop_internal_daemon(pid));
 
-			bbackupd.RunSyncNow();
-			TEST_THAT(intercept_triggered());
-			intercept_clear_setup();
-			Timers::Cleanup();
-		}
-
 		// check that the diff was aborted, i.e. upload was not a diff
 		found1 = false;
 
@@ -1179,7 +1174,7 @@
 		{
 			std::string line;
 			TEST_THAT(reader.GetLine(line));
-			if (line == "Send ListDirectory(0x3,0xffff,0xc,true)")
+			if (line == "Send ListDirectory(0x3,0xffffffff,0xc,true)")
 			{
 				found1 = true;
 				break;




More information about the Boxbackup-commit mailing list