Skip to content

Commit

Permalink
resolv-tests failing with memory leak
Browse files Browse the repository at this point in the history
Wait for c-ares to finish before checking for memory leaks.

https://fedorahosted.org/sssd/ticket/1899
  • Loading branch information
mzidek-gh authored and jhrozek committed Jul 25, 2013
1 parent 134106a commit ff7ea28
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tests/resolv-tests.c
Expand Up @@ -38,7 +38,7 @@
/* Interface under test */
#include "resolv/async_resolv.h"

#define RESOLV_DEFAULT_TIMEOUT 5
#define RESOLV_DEFAULT_TIMEOUT 6

static int use_net_test;
static char *txt_host;
Expand Down Expand Up @@ -803,7 +803,8 @@ START_TEST(test_resolv_free_req)
gettimeofday(&free_tv, NULL);
free_tv.tv_sec += 1;
free_tv.tv_usec = 0;
terminate_tv.tv_sec = free_tv.tv_sec + 1;
/* Give enought time for c-ares request to terminate */
terminate_tv.tv_sec = free_tv.tv_sec + 6;
terminate_tv.tv_usec = 0;

free_timer = tevent_add_timer(test_ctx->ev, test_ctx, free_tv, resolv_free_req, req);
Expand Down Expand Up @@ -890,6 +891,7 @@ Suite *create_resolv_suite(void)
Suite *s = suite_create("resolv");

TCase *tc_resolv = tcase_create("RESOLV Tests");
tcase_set_timeout(tc_resolv, 8);

tcase_add_checked_fixture(tc_resolv, ck_leak_check_setup, ck_leak_check_teardown);
/* Do some testing */
Expand Down

0 comments on commit ff7ea28

Please sign in to comment.