summaryrefslogtreecommitdiff
path: root/test/bbackupd
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-12-03 14:04:03 +0000
committerChris Wilson <chris+github@qwirx.com>2014-12-03 14:04:03 +0000
commit6d6269d6e3f14ff68cfe6ea35a935bae39a8ed2d (patch)
tree064888233c5fe64d00ad7fadedbc119514ae7345 /test/bbackupd
parent9c356f2909d829ef3315e450b6b747a6f16cf771 (diff)
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.
Diffstat (limited to 'test/bbackupd')
-rw-r--r--test/bbackupd/testbbackupd.cpp11
-rw-r--r--test/bbackupd/testfiles/bbackupd-snapshot.conf.in1
-rw-r--r--test/bbackupd/testfiles/bbackupd.conf.in1
3 files changed, 8 insertions, 5 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp
index 19cd8a2f..bd4df2dc 100644
--- a/test/bbackupd/testbbackupd.cpp
+++ b/test/bbackupd/testbbackupd.cpp
@@ -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 @@ bool unpack_files(const std::string& archive_file,
"-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 @@ bool test_store_error_reporting()
// 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 @@ bool test_store_error_reporting()
// 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 @@ bool test_changing_client_store_marker_pauses_daemon()
// 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 @@ bool test_parse_incomplete_command()
// 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);
}
diff --git a/test/bbackupd/testfiles/bbackupd-snapshot.conf.in b/test/bbackupd/testfiles/bbackupd-snapshot.conf.in
index d245d077..73b50c6e 100644
--- a/test/bbackupd/testfiles/bbackupd-snapshot.conf.in
+++ b/test/bbackupd/testfiles/bbackupd-snapshot.conf.in
@@ -13,6 +13,7 @@ AccountNumber = 0x01234567
AutomaticBackup = no
UpdateStoreInterval = 0
+BackupErrorDelay = 10
MinimumFileAge = 4
MaxUploadWait = 24
DeleteRedundantLocationsAfter = 10
diff --git a/test/bbackupd/testfiles/bbackupd.conf.in b/test/bbackupd/testfiles/bbackupd.conf.in
index 712b58b2..f0080c4a 100644
--- a/test/bbackupd/testfiles/bbackupd.conf.in
+++ b/test/bbackupd/testfiles/bbackupd.conf.in
@@ -12,6 +12,7 @@ StorePort = 22011
AccountNumber = 0x01234567
UpdateStoreInterval = 3
+BackupErrorDelay = 10
MinimumFileAge = 4
MaxUploadWait = 24
DeleteRedundantLocationsAfter = 10