From 0628d1c0e698e754bada494312a64b2dad65f25c Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Mon, 8 Aug 2011 14:09:46 +0200 Subject: client: add req timeout argument to ctdb_cmdline_client Following connection to the local ctdbd, ctdb_cmdline_client() currently issues a CTDB_CONTROL_GET_PNN request with a fixed 3 second timeout. The ctdb cmd line client accepts a --timelimit argument for specifying a per request timeout, pass this value through to ctdb_cmdline_client() for use as a CTDB_CONTROL_GET_PNN request timeout. (This used to be ctdb commit 0634d0305f42f17048b6830733767e8dc300e11c) --- ctdb/tests/src/ctdb_fetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ctdb/tests/src/ctdb_fetch.c') diff --git a/ctdb/tests/src/ctdb_fetch.c b/ctdb/tests/src/ctdb_fetch.c index a8f38eeea3..b97e2ef023 100644 --- a/ctdb/tests/src/ctdb_fetch.c +++ b/ctdb/tests/src/ctdb_fetch.c @@ -207,7 +207,7 @@ int main(int argc, const char *argv[]) ev = event_context_init(NULL); - ctdb = ctdb_cmdline_client(ev); + ctdb = ctdb_cmdline_client(ev, timeval_current_ofs(3, 0)); if (ctdb == NULL) { printf("failed to connect to ctdb daemon.\n"); -- cgit From 5296da5609fcab1f24ea4d5578988acd831c5248 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Mon, 8 Aug 2011 16:35:56 +0200 Subject: client: add timeout argument to ctdb_attach Rather than using a fixed 2 second CTDB_CONTROL_GETDBPATH timeout. (This used to be ctdb commit 9e178671560cb95121e11d718a76b05380ecd6c5) --- ctdb/tests/src/ctdb_fetch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ctdb/tests/src/ctdb_fetch.c') diff --git a/ctdb/tests/src/ctdb_fetch.c b/ctdb/tests/src/ctdb_fetch.c index b97e2ef023..f0311c8948 100644 --- a/ctdb/tests/src/ctdb_fetch.c +++ b/ctdb/tests/src/ctdb_fetch.c @@ -218,7 +218,8 @@ int main(int argc, const char *argv[]) &cluster_ready); /* attach to a specific database */ - ctdb_db = ctdb_attach(ctdb, "test.tdb", false, 0); + ctdb_db = ctdb_attach(ctdb, timeval_current_ofs(2, 0), "test.tdb", + false, 0); if (!ctdb_db) { printf("ctdb_attach failed - %s\n", ctdb_errstr(ctdb)); exit(1); -- cgit