diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-19 17:44:57 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-19 17:44:57 +0300 |
commit | e1250bcf595973ff46cf7766590a1491eddfe60d (patch) | |
tree | ff5ee21edafb21cb434261c6a0f2d2f153850783 /test/rspamd_memcached_test.c | |
parent | 5f4f8d47039fbc366c4d7e34e4870d7d374c2061 (diff) | |
download | rspamd-e1250bcf595973ff46cf7766590a1491eddfe60d.tar.gz rspamd-e1250bcf595973ff46cf7766590a1491eddfe60d.zip |
* Add functions support to rspamd regexps
* Parse expressions with state machine which allows different kinds of arguments in expressions
* Fix test to accord current data
* Add support of fucntions to regexp module
* Move all regexp logic to separate file, describe its API
* Fix descriptors leakage in surbl module
Diffstat (limited to 'test/rspamd_memcached_test.c')
-rw-r--r-- | test/rspamd_memcached_test.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/rspamd_memcached_test.c b/test/rspamd_memcached_test.c index 6ce983282..cd2e2dec8 100644 --- a/test/rspamd_memcached_test.c +++ b/test/rspamd_memcached_test.c @@ -27,7 +27,13 @@ memcached_callback (memcached_ctx_t *ctx, memc_error_t error, void *data) switch (ctx->op) { case CMD_CONNECT: - g_assert (error == OK); + if (error != OK) { + msg_warn ("Connect failed, skipping test"); + memc_close_ctx (ctx); + tv.tv_sec = 0; + tv.tv_usec = 0; + event_loopexit (&tv); + } msg_debug ("Connect ok"); memc_set (ctx, ctx->param, 60); break; @@ -41,7 +47,13 @@ memcached_callback (memcached_ctx_t *ctx, memc_error_t error, void *data) event_loopexit (&tv); break; case CMD_WRITE: - g_assert (error == OK); + if (error != OK) { + msg_warn ("Connect failed, skipping test"); + memc_close_ctx (ctx); + tv.tv_sec = 0; + tv.tv_usec = 0; + event_loopexit (&tv); + } msg_debug ("Write ok"); ctx->param->buf = g_malloc (sizeof (buf)); bzero (ctx->param->buf, sizeof (buf)); |