diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2010-02-22 10:28:26 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-02-22 12:54:53 -0500 |
commit | e0bb119bdc1549d731f371202428c0cb667d3388 (patch) | |
tree | 3c4edcfb90558ca95a36c6edafdf9a98f35474d0 /src/tests/fail_over-tests.c | |
parent | 48dbc3c447449b9bb1a9b7c839b9471ef4f547bf (diff) | |
download | sssd-e0bb119bdc1549d731f371202428c0cb667d3388.tar.gz sssd-e0bb119bdc1549d731f371202428c0cb667d3388.tar.xz sssd-e0bb119bdc1549d731f371202428c0cb667d3388.zip |
Restrict family lookups
Adds a new option that tells resolver which address family to prefer or
use exclusively.
Fixes: #404
Diffstat (limited to 'src/tests/fail_over-tests.c')
-rw-r--r-- | src/tests/fail_over-tests.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tests/fail_over-tests.c b/src/tests/fail_over-tests.c index e794f03b5..4e97a1e2b 100644 --- a/src/tests/fail_over-tests.c +++ b/src/tests/fail_over-tests.c @@ -60,6 +60,7 @@ static struct test_ctx * setup_test(void) { struct test_ctx *ctx; + struct fo_options fopts; int ret; ctx = talloc_zero(global_talloc_context, struct test_ctx); @@ -77,7 +78,10 @@ setup_test(void) fail("Could not init resolv context"); } - ctx->fo_ctx = fo_context_init(ctx, 5 * 60); + fopts.retry_timeout = 30; + fopts.family_order = IPV4_FIRST; + + ctx->fo_ctx = fo_context_init(ctx, &fopts); if (ctx->fo_ctx == NULL) { talloc_free(ctx); fail("Could not init fail over context"); @@ -198,7 +202,9 @@ _get_request(struct test_ctx *test_ctx, struct fo_service *service, task->location = location; test_ctx->tasks++; - req = fo_resolve_service_send(test_ctx, test_ctx->ev, test_ctx->resolv, service); + req = fo_resolve_service_send(test_ctx, test_ctx->ev, + test_ctx->resolv, + test_ctx->fo_ctx, service); fail_if(req == NULL, "%s: fo_resolve_service_send() failed", location); tevent_req_set_callback(req, test_resolve_service_callback, task); |