From 8e83d6c0b8eafcad71d006f257a9f54a7565c75a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 21 Apr 2007 11:43:58 +0000 Subject: Enhance test for bbackupd pausing on change of client store marker (refs #3) --- test/bbackupd/testbbackupd.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp index 742a11dd..fcc2ad47 100644 --- a/test/bbackupd/testbbackupd.cpp +++ b/test/bbackupd/testbbackupd.cpp @@ -1179,9 +1179,30 @@ int test_bbackupd() "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 -- cgit v1.2.3