[Box Backup-commit] COMMIT r3433 - in box/trunk/test/bbackupd: . testfiles
subversion at boxbackup.org
subversion at boxbackup.org
Wed Dec 3 14:04:03 GMT 2014
Author: chris
Date: 2014-12-03 14:04:03 +0000 (Wed, 03 Dec 2014)
New Revision: 3433
Modified:
box/trunk/test/bbackupd/testbbackupd.cpp
box/trunk/test/bbackupd/testfiles/bbackupd-snapshot.conf.in
box/trunk/test/bbackupd/testfiles/bbackupd.conf.in
Log:
Reduce wait in test_store_error_reporting from 100 seconds to 10.
This makes the tests run ~300 seconds faster, and coincidentally somehow
fixes or prevents a test failure on FreeBSD on this test, probably some
race condition.
Modified: box/trunk/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/trunk/test/bbackupd/testbbackupd.cpp 2014-12-03 14:01:43 UTC (rev 3432)
+++ box/trunk/test/bbackupd/testbbackupd.cpp 2014-12-03 14:04:03 UTC (rev 3433)
@@ -91,6 +91,7 @@
// two cycles and a bit
#define TIME_TO_WAIT_FOR_BACKUP_OPERATION 12
#define SHORT_TIMEOUT 5000
+#define BACKUP_ERROR_DELAY_SHORTENED 10
std::string current_test_name;
std::map<std::string, std::string> s_test_status;
@@ -328,7 +329,7 @@
"-C " + destination_dir;
#else
std::string cmd("gzip -d < testfiles/");
- cmd += archive_file + ".tgz | ( cd " + destination_dir + " && tar xv " +
+ cmd += archive_file + ".tgz | ( cd " + destination_dir + " && tar xvf - " +
tar_options + ")";
#endif
@@ -2881,7 +2882,7 @@
// a random delay of up to mUpdateStoreInterval/64 or 0.05
// extra seconds) from store_fixed_time, so check that it
// hasn't run just before this time
- wait_for_operation(BACKUP_ERROR_RETRY_SECONDS +
+ wait_for_operation(BACKUP_ERROR_DELAY_SHORTENED +
(store_fixed_time - time(NULL)) - 1,
"just before bbackupd recovers");
TEST_THAT(!TestFileExists("testfiles/"
@@ -2956,7 +2957,7 @@
// a random delay of up to mUpdateStoreInterval/64 or 0.05
// extra seconds) from store_fixed_time, so check that it
// hasn't run just before this time
- wait_for_operation(BACKUP_ERROR_RETRY_SECONDS +
+ wait_for_operation(BACKUP_ERROR_DELAY_SHORTENED +
(store_fixed_time - time(NULL)) - 1,
"just before bbackupd recovers");
TEST_THAT(!TestFileExists("testfiles/"
@@ -3789,7 +3790,7 @@
// Test that there *are* differences
TEST_COMPARE(Compare_Different);
- wait_for_operation(BACKUP_ERROR_RETRY_SECONDS,
+ wait_for_operation(BACKUP_ERROR_DELAY_SHORTENED,
"bbackupd to recover");
// Then check it has backed up successfully.
@@ -4020,7 +4021,7 @@
// This is not a complete command, it should not parse!
BackupQueries::ParsedCommand cmd("-od", true);
TEST_THAT(cmd.mFailed);
- TEST_EQUAL(0, cmd.pSpec);
+ TEST_EQUAL((void *)NULL, cmd.pSpec);
TEST_EQUAL(0, cmd.mCompleteArgCount);
}
Modified: box/trunk/test/bbackupd/testfiles/bbackupd-snapshot.conf.in
===================================================================
--- box/trunk/test/bbackupd/testfiles/bbackupd-snapshot.conf.in 2014-12-03 14:01:43 UTC (rev 3432)
+++ box/trunk/test/bbackupd/testfiles/bbackupd-snapshot.conf.in 2014-12-03 14:04:03 UTC (rev 3433)
@@ -13,6 +13,7 @@
AutomaticBackup = no
UpdateStoreInterval = 0
+BackupErrorDelay = 10
MinimumFileAge = 4
MaxUploadWait = 24
DeleteRedundantLocationsAfter = 10
Modified: box/trunk/test/bbackupd/testfiles/bbackupd.conf.in
===================================================================
--- box/trunk/test/bbackupd/testfiles/bbackupd.conf.in 2014-12-03 14:01:43 UTC (rev 3432)
+++ box/trunk/test/bbackupd/testfiles/bbackupd.conf.in 2014-12-03 14:04:03 UTC (rev 3433)
@@ -12,6 +12,7 @@
AccountNumber = 0x01234567
UpdateStoreInterval = 3
+BackupErrorDelay = 10
MinimumFileAge = 4
MaxUploadWait = 24
DeleteRedundantLocationsAfter = 10
More information about the Boxbackup-commit
mailing list