[Box Backup-commit] COMMIT r3458 - box/trunk/test/bbackupd
subversion at boxbackup.org
subversion at boxbackup.org
Wed Dec 10 23:45:43 GMT 2014
Author: chris
Date: 2014-12-10 23:45:43 +0000 (Wed, 10 Dec 2014)
New Revision: 3458
Modified:
box/trunk/test/bbackupd/testbbackupd.cpp
Log:
Fix timing issue causing test_changing_client_store_marker_pauses_daemon to fail.
We didn't take into account the time taken to perform a compare as part of
the test, when deciding how long to wait for bbackupd to recover.
Modified: box/trunk/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/trunk/test/bbackupd/testbbackupd.cpp 2014-12-10 23:44:04 UTC (rev 3457)
+++ box/trunk/test/bbackupd/testbbackupd.cpp 2014-12-10 23:45:43 UTC (rev 3458)
@@ -352,8 +352,10 @@
bool configure_bbackupd(BackupDaemon& bbackupd, const std::string& config_file)
{
// Stop bbackupd initialisation from changing the console logging level
+ // and the program name tag.
Logger& console(Logging::GetConsole());
Logger::LevelGuard guard(console, console.GetLevel());
+ Logging::Tagger();
std::vector<std::string> args;
size_t last_arg_start = 0;
@@ -3823,12 +3825,15 @@
// Wait for bbackupd to detect the problem
wait_for_sync_end();
+ int sync_end_time = time(NULL);
// Test that there *are* differences
TEST_COMPARE(Compare_Different);
- // Wait out the expected delay in bbackupd
- wait_for_operation(BACKUP_ERROR_DELAY_SHORTENED - 1,
+ // Wait out the expected delay in bbackupd
+ int current_time = time(NULL);
+ wait_for_operation(sync_end_time - current_time +
+ BACKUP_ERROR_DELAY_SHORTENED - 1,
"just before bbackupd recovers");
// bbackupd should not have recovered yet, so there should
More information about the Boxbackup-commit
mailing list