]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Sigh, just wait...
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 19 Jul 2019 17:36:47 +0000 (18:36 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 19 Jul 2019 17:36:47 +0000 (18:36 +0100)
lualib/lua_redis.lua
test/functional/cases/330_neural.robot

index f62ee05bb526b0cdd40c4e53dea86d3594b184c8..67bf271ab1346328567b8cef1a10c1f429a53f8f 100644 (file)
@@ -1299,7 +1299,14 @@ local function exec_redis_script(id, params, callback, keys, args)
       table.insert(script.waitq, do_call)
     else
       -- TODO: fix taskfull requests
-      callback('NOSCRIPT', nil)
+      table.insert(script.waitq, function()
+        if script.loaded then
+          do_call(false)
+        else
+          callback('NOSCRIPT', nil)
+        end
+      end)
+      load_script_task(script, params.task)
     end
   end
 
index e08a36145505d8c7a738c51127f0113b6ffacc6e..5751ee60fbcbc12a527602ca468f78a848d55a06 100644 (file)
@@ -15,6 +15,7 @@ ${RSPAMD_SCOPE}  Suite
 
 *** Test Cases ***
 Train Spam
+  Sleep  2s  Wait for redis mess
   : FOR    ${INDEX}    IN RANGE    0    10
   \  ${result} =  Scan Message With Rspamc  ${MESSAGE}  --header  Settings={symbols_enabled = ["SPAM_SYMBOL"]}
   \  Check Rspamc  ${result}  SPAM_SYMBOL (1.00)