summaryrefslogtreecommitdiff
path: root/test/bbackupd
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-08-07 21:40:12 +0000
committerChris Wilson <chris+github@qwirx.com>2015-08-07 21:40:12 +0000
commitae6fe330622fb95f08f2998f4820c154cc88543d (patch)
treec6beecba48e7d0096c61a983552466dbea34deed /test/bbackupd
parent533202637476e2386621fe3de3c6644cc63f033f (diff)
Fix random failures of testbbackup test_backup_pauses_when_store_is_full.
Stop the client while waiting for housekeeping, to ensure that it doesn't prevent housekeeping from running and cause the test to fail.
Diffstat (limited to 'test/bbackupd')
-rw-r--r--test/bbackupd/testbbackupd.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp
index 6baa5d06..1eb9d0f7 100644
--- a/test/bbackupd/testbbackupd.cpp
+++ b/test/bbackupd/testbbackupd.cpp
@@ -1816,7 +1816,10 @@ bool test_backup_pauses_when_store_is_full()
TEST_THAT(!TestFileExists("testfiles/notifyran.store-full.2"));
// We can't guarantee to get in before housekeeping runs, so it's safer
- // (more reliable) to wait for it to finish.
+ // (more reliable) to wait for it to finish. But we also need to stop the
+ // client first, otherwise it might be connected when housekeeping tries
+ // to run, and that would prevent it from running, causing test to fail.
+ TEST_THAT_OR(StopClient(), FAIL);
wait_for_operation(5, "housekeeping to run");
// BLOCK
@@ -1863,6 +1866,7 @@ bool test_backup_pauses_when_store_is_full()
// Increase the limit again, check that all files are backed up on the
// next run.
TEST_THAT(change_account_limits("0B", "34B"));
+ TEST_THAT_OR(StartClient(), FAIL);
wait_for_sync_end();
TEST_COMPARE(Compare_Same);