Changeset 2320 for box/trunk/test


Ignore:
Timestamp:
04/10/2008 16:14:20 (4 years ago)
Author:
chris
Message:

Fix bbackupd/housekeeping deletion test for Unix again, and hopefully
make it work on Windows too. Improve comments about this test.

File:
1 edited

Legend:

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

    r2316 r2320  
    14081408                // d3/d4/f5     excluded 
    14091409                // d7           deleted 
    1410                 // Careful with timing here, these files can already be 
    1411                 // deleted by housekeeping. On Win32, housekeeping runs 
    1412                 // immediately after disconnect, but only if enough time 
     1410                // Careful with timing here, these files will be removed by 
     1411                // housekeeping the next time it runs. On Win32, housekeeping 
     1412                // runs immediately after disconnect, but only if enough time 
    14131413                // has elapsed since the last housekeeping. Since the 
    14141414                // backup run closely follows the last one, housekeeping 
    1415                 // should not run afterwards. By waiting before 
    1416                 // connecting to check the results, we should force 
    1417                 // housekeeping to run after that check, so the next check 
    1418                 // will see that the deleted files have been removed. 
    1419  
    1420 #ifndef WIN32 
    1421                 BOX_TRACE("Wait long enough that housekeeping " 
    1422                         "will run again") 
    1423                 wait_for_backup_operation(5); 
    1424                 BOX_TRACE("done."); 
     1415                // should not run afterwards. On other platforms, we want to 
     1416                // get in immediately after the backup and hope that 
     1417                // housekeeping doesn't beat us to it. 
    14251418 
    14261419                BOX_TRACE("Find out whether bbackupd marked files as deleted"); 
     
    14551448                        // they are excluded by the new configuration. 
    14561449                        // but housekeeping should not have run yet 
     1450 
    14571451                        TEST_THAT(test_entry_deleted(*spacetest_dir, "f2")); 
    14581452                        TEST_THAT(test_entry_deleted(*spacetest_dir, "d3")); 
     
    14951489                        return 1; 
    14961490                } 
    1497 #endif 
    1498  
    1499                 // Wait for housekeeping to run 
     1491 
    15001492                BOX_TRACE("Wait for housekeeping to remove the deleted files"); 
    15011493                wait_for_backup_operation(5); 
Note: See TracChangeset for help on using the changeset viewer.