Changeset 2499


Ignore:
Timestamp:
10/04/2009 00:06:42 (3 years ago)
Author:
chris
Message:

Fix race conditions where backups happen too slowly and tests fail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/test/bbackupd/testbbackupd.cpp

    r2496 r2499  
    17561756                } 
    17571757 
    1758                 test_run_bbstored(); 
     1758                TEST_THAT(test_run_bbstored() == 0); 
    17591759 
    17601760                cmd = BBACKUPD " " + bbackupd_args + 
     
    25422542                } 
    25432543 
    2544                 // wait for backup daemon to do it's stuff, and compare again 
    2545                 wait_for_backup_operation("bbackupd to sync the changes"); 
    2546  
     2544                // wait long enough for new files to be old enough to backup 
     2545                wait_for_operation(5, "new files to be old enough"); 
     2546 
     2547                // wait for backup daemon to do it's stuff 
     2548                sync_and_wait(); 
     2549 
     2550                // compare to make sure that it worked 
    25472551                compareReturnValue = ::system(BBACKUPQUERY " -Wwarning " 
    25482552                        "-c testfiles/bbackupd.conf " 
     
    29952999                TEST_THAT(TestFileExists("testfiles/TestDir1/tracked-2")); 
    29963000 
     3001                // wait for them to be old enough to back up 
     3002                wait_for_operation(5, "tracked files to be old enough"); 
     3003                 
    29973004                // back up both files 
    2998                 wait_for_operation(5, "tracked files to be old enough"); 
    2999                 wait_for_backup_operation("bbackupd to sync the tracked files"); 
    3000  
     3005                sync_and_wait(); 
     3006 
     3007                // compare to make sure that it worked 
    30013008                compareReturnValue = ::system(BBACKUPQUERY " " 
    30023009                        "-c testfiles/bbackupd.conf " 
     
    40404047 
    40414048        r = test_run_bbstored(); 
     4049        TEST_THAT(r == 0); 
    40424050        if(r != 0) return r; 
    40434051         
Note: See TracChangeset for help on using the changeset viewer.