test: use valid config for jq function timeout
This commit is contained in:
parent
3f9ed08308
commit
f5e9d3eab2
|
@ -28,7 +28,7 @@
|
|||
|
||||
init_per_suite(Config) ->
|
||||
application:load(emqx_conf),
|
||||
ConfigConf = <<"rule_engine {jq_function_default_timeout {}}">>,
|
||||
ConfigConf = <<"rule_engine {jq_function_default_timeout=10s}">>,
|
||||
ok = emqx_common_test_helpers:load_config(emqx_rule_engine_schema, ConfigConf),
|
||||
Config.
|
||||
|
||||
|
@ -691,20 +691,10 @@ t_jq(_) ->
|
|||
ConfigRootKey,
|
||||
jq_function_default_timeout
|
||||
]),
|
||||
case DefaultTimeOut =< 15000 of
|
||||
true ->
|
||||
got_timeout =
|
||||
try
|
||||
?assertThrow(
|
||||
{jq_exception, {timeout, _}},
|
||||
apply_func(jq, [TOProgram, <<"-2">>])
|
||||
catch
|
||||
throw:{jq_exception, {timeout, _}} ->
|
||||
%% Got timeout as expected
|
||||
got_timeout
|
||||
end;
|
||||
false ->
|
||||
%% Skip test as we don't want it to take to long time to run
|
||||
ok
|
||||
end.
|
||||
).
|
||||
|
||||
ascii_string() -> list(range(0, 127)).
|
||||
|
||||
|
|
Loading…
Reference in New Issue