summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2006-09-02 11:06:13 +0000
committerChris Wilson <chris+github@qwirx.com>2006-09-02 11:06:13 +0000
commit217379b9ec7eaf4317cde68db939b910c58366cc (patch)
tree12c0c4fc6af25da5708986a94757f8508121bfad
parent18dc6c07753520a5464d6b385817b46f0839b1ef (diff)
(refs #3)
Cannot signal bbstored to housekeep immediately on Win32, so just wait for it to happen.
-rw-r--r--test/backupstorepatch/testbackupstorepatch.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/backupstorepatch/testbackupstorepatch.cpp b/test/backupstorepatch/testbackupstorepatch.cpp
index d14badc6..368d835a 100644
--- a/test/backupstorepatch/testbackupstorepatch.cpp
+++ b/test/backupstorepatch/testbackupstorepatch.cpp
@@ -579,9 +579,18 @@ int test(int argc, const char *argv[])
writedir.Commit(true);
}
- // Send the server a restart signal, so it does housekeeping immedaitely, and wait for it to happen
- ::sleep(1); // wait for old connections to terminate
+#ifdef WIN32
+ // Cannot signal bbstored to do housekeeping now,
+ // so just wait until we're sure it's done
+ wait_for_operation(12);
+#else
+ // Send the server a restart signal, so it does
+ // housekeeping immediately, and wait for it to happen
+ // Wait for old connections to terminate
+ ::sleep(1);
::kill(pid, SIGHUP);
+#endif
+
// Get the revision number of the info file
int64_t first_revision = 0;
RaidFileRead::FileExists(0, "backup/01234567/o01", &first_revision);