commit 07ed388: [Minor] Tune Lua GC for Lua unit tests

Anton Yuzhaninov citrin+git at citrin.ru
Wed Feb 9 20:07:04 UTC 2022


Author: Anton Yuzhaninov
Date: 2022-02-08 21:22:34 +0000
URL: https://github.com/rspamd/rspamd/commit/07ed38868355db75fc0b7a2bc614c0bb9e19eabb (refs/pull/4066/head)

[Minor] Tune Lua GC for Lua unit tests
Fixes sporadic unit test failures (on Mac OS X).

---
 test/rspamd_test_suite.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/rspamd_test_suite.c b/test/rspamd_test_suite.c
index 8c0dc1c29..62b22616a 100644
--- a/test/rspamd_test_suite.c
+++ b/test/rspamd_test_suite.c
@@ -35,6 +35,8 @@ main (int argc, char **argv)
 	rspamd_main->server_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL, 0);
 	cfg = rspamd_config_new (RSPAMD_CONFIG_INIT_DEFAULT);
 	cfg->libs_ctx = rspamd_init_libs ();
+	/* More agressive GC, workaround for 'not enough memory' test failures */
+	cfg->lua_gc_step *= 2;
 	rspamd_main->cfg = cfg;
 	cfg->cfg_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL, 0);
 


More information about the Commits mailing list