aboutsummaryrefslogtreecommitdiffstats
path: root/test/rspamd_dns_test.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-21 12:18:19 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-22 10:57:29 +0100
commit300acf008d6d194f0107e293a20cfb88611546e9 (patch)
treea7706600533bbdb32efcfe6078b6a5ae330f3ec5 /test/rspamd_dns_test.c
parentb862f3717beee6bf735cfd89a51f41440b26bd0c (diff)
downloadrspamd-300acf008d6d194f0107e293a20cfb88611546e9.tar.gz
rspamd-300acf008d6d194f0107e293a20cfb88611546e9.zip
[Test] Fix functional tests
Diffstat (limited to 'test/rspamd_dns_test.c')
-rw-r--r--test/rspamd_dns_test.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/rspamd_dns_test.c b/test/rspamd_dns_test.c
index 8f0baca84..6b12746ae 100644
--- a/test/rspamd_dns_test.c
+++ b/test/rspamd_dns_test.c
@@ -8,17 +8,13 @@
#include "cfg_file.h"
static guint requests = 0;
-extern struct ev_loop *base;
+extern struct ev_loop *event_loop;
struct rspamd_dns_resolver *resolver;
gboolean
session_fin (gpointer unused)
{
- struct timeval tv;
-
- tv.tv_sec = 0;
- tv.tv_usec = 0;
- event_loopexit (&tv);
+ ev_break (event_loop, EVBREAK_ALL);
return TRUE;
}
@@ -82,7 +78,7 @@ rspamd_dns_test_func ()
s = rspamd_session_create (pool, session_fin, NULL, NULL, NULL);
- resolver = rspamd_dns_resolver_init (NULL, base, cfg);
+ resolver = rspamd_dns_resolver_init (NULL, event_loop, cfg);
requests ++;
g_assert (rspamd_dns_resolver_request (resolver, s, pool, test_dns_cb, NULL, RDNS_REQUEST_A, "google.com"));
@@ -104,5 +100,5 @@ rspamd_dns_test_func ()
g_assert (resolver != NULL);
- event_loop (0);
+ ev_run (event_loop, 0);
}