From 650d81b252cc669ef848448afad7e9bb79c4f20e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 21 Apr 2007 07:23:42 +0000 Subject: r22421: merged in latest ctdb changes from bzr (This used to be commit 3633f862b966866819c9a0a6ad0238a858e15e62) --- source4/cluster/ctdb/tests/ctdb_test.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'source4/cluster/ctdb/tests/ctdb_test.c') diff --git a/source4/cluster/ctdb/tests/ctdb_test.c b/source4/cluster/ctdb/tests/ctdb_test.c index 8125cc4490..dec1ea5100 100644 --- a/source4/cluster/ctdb/tests/ctdb_test.c +++ b/source4/cluster/ctdb/tests/ctdb_test.c @@ -22,7 +22,7 @@ #include "lib/events/events.h" #include "system/filesys.h" #include "popt.h" -#include "tests/cmdline.h" +#include "cmdline.h" enum my_functions {FUNC_SORT=1, FUNC_FETCH=2}; @@ -133,6 +133,8 @@ int main(int argc, const char *argv[]) /* start the protocol running */ ret = ctdb_start(ctdb); + ctdb_connect_wait(ctdb); + ZERO_STRUCT(call); call.key.dptr = discard_const("test"); call.key.dsize = strlen("test")+1; @@ -169,14 +171,7 @@ int main(int argc, const char *argv[]) talloc_free(call.reply_data.dptr); /* go into a wait loop to allow other nodes to complete */ - ctdb_wait_loop(ctdb); - - /*talloc_report_full(ctdb, stdout);*/ - -/* sleep for a while so that our daemon will remaining alive for the other nodes in the cluster */ -sleep(10); + ctdb_shutdown(ctdb); - /* shut it down */ - talloc_free(ctdb); return 0; } -- cgit