fix: add timeout for schema json gen test
This commit is contained in:
parent
9080b19440
commit
a77bb994e1
|
@ -841,29 +841,29 @@ fields("mqtt_quic_listener") ->
|
||||||
{"enabled",
|
{"enabled",
|
||||||
sc(
|
sc(
|
||||||
boolean(),
|
boolean(),
|
||||||
#{ default => true
|
#{
|
||||||
, desc => ?DESC(fields_mqtt_quic_listener_enabled)
|
default => true,
|
||||||
|
desc => ?DESC(fields_mqtt_quic_listener_enabled)
|
||||||
}
|
}
|
||||||
)},
|
)},
|
||||||
%% TODO: ensure cacertfile is configurable
|
%% TODO: ensure cacertfile is configurable
|
||||||
{"certfile",
|
{"certfile",
|
||||||
sc(
|
sc(
|
||||||
string(),
|
string(),
|
||||||
#{ desc => ?DESC(fields_mqtt_quic_listener_certfile)
|
#{desc => ?DESC(fields_mqtt_quic_listener_certfile)}
|
||||||
}
|
|
||||||
)},
|
)},
|
||||||
{"keyfile",
|
{"keyfile",
|
||||||
sc(
|
sc(
|
||||||
string(),
|
string(),
|
||||||
#{ desc => ?DESC(fields_mqtt_quic_listener_keyfile)
|
#{desc => ?DESC(fields_mqtt_quic_listener_keyfile)}
|
||||||
}
|
|
||||||
)},
|
)},
|
||||||
{"ciphers", ciphers_schema(quic)},
|
{"ciphers", ciphers_schema(quic)},
|
||||||
{"idle_timeout",
|
{"idle_timeout",
|
||||||
sc(
|
sc(
|
||||||
duration(),
|
duration(),
|
||||||
#{ default => "15s"
|
#{
|
||||||
, desc => ?DESC(fields_mqtt_quic_listener_idle_timeout)
|
default => "15s",
|
||||||
|
desc => ?DESC(fields_mqtt_quic_listener_idle_timeout)
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
] ++ base_listener();
|
] ++ base_listener();
|
||||||
|
@ -1008,20 +1008,17 @@ fields("tcp_opts") ->
|
||||||
{"recbuf",
|
{"recbuf",
|
||||||
sc(
|
sc(
|
||||||
bytesize(),
|
bytesize(),
|
||||||
#{ desc => ?DESC(fields_tcp_opts_recbuf)
|
#{desc => ?DESC(fields_tcp_opts_recbuf)}
|
||||||
}
|
|
||||||
)},
|
)},
|
||||||
{"sndbuf",
|
{"sndbuf",
|
||||||
sc(
|
sc(
|
||||||
bytesize(),
|
bytesize(),
|
||||||
#{ desc => ?DESC(fields_tcp_opts_sndbuf)
|
#{desc => ?DESC(fields_tcp_opts_sndbuf)}
|
||||||
}
|
|
||||||
)},
|
)},
|
||||||
{"buffer",
|
{"buffer",
|
||||||
sc(
|
sc(
|
||||||
bytesize(),
|
bytesize(),
|
||||||
#{ desc => ?DESC(fields_tcp_opts_buffer)
|
#{desc => ?DESC(fields_tcp_opts_buffer)}
|
||||||
}
|
|
||||||
)},
|
)},
|
||||||
{"high_watermark",
|
{"high_watermark",
|
||||||
sc(
|
sc(
|
||||||
|
@ -1075,8 +1072,7 @@ fields("deflate_opts") ->
|
||||||
{"level",
|
{"level",
|
||||||
sc(
|
sc(
|
||||||
hoconsc:enum([none, default, best_compression, best_speed]),
|
hoconsc:enum([none, default, best_compression, best_speed]),
|
||||||
#{ desc => ?DESC(fields_deflate_opts_level)
|
#{desc => ?DESC(fields_deflate_opts_level)}
|
||||||
}
|
|
||||||
)},
|
)},
|
||||||
{"mem_level",
|
{"mem_level",
|
||||||
sc(
|
sc(
|
||||||
|
@ -1089,8 +1085,7 @@ fields("deflate_opts") ->
|
||||||
{"strategy",
|
{"strategy",
|
||||||
sc(
|
sc(
|
||||||
hoconsc:enum([default, filtered, huffman_only, rle]),
|
hoconsc:enum([default, filtered, huffman_only, rle]),
|
||||||
#{ desc => ?DESC(fields_deflate_opts_strategy)
|
#{desc => ?DESC(fields_deflate_opts_strategy)}
|
||||||
}
|
|
||||||
)},
|
)},
|
||||||
{"server_context_takeover",
|
{"server_context_takeover",
|
||||||
sc(
|
sc(
|
||||||
|
@ -1954,7 +1949,8 @@ ciphers_schema(Default) ->
|
||||||
true -> undefined;
|
true -> undefined;
|
||||||
false -> fun validate_ciphers/1
|
false -> fun validate_ciphers/1
|
||||||
end,
|
end,
|
||||||
desc_id => "ciphers_schema_" ++ case Default of
|
desc_id => "ciphers_schema_" ++
|
||||||
|
case Default of
|
||||||
quic -> "quic";
|
quic -> "quic";
|
||||||
_ -> "0"
|
_ -> "0"
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -7,8 +7,22 @@
|
||||||
-include_lib("eunit/include/eunit.hrl").
|
-include_lib("eunit/include/eunit.hrl").
|
||||||
|
|
||||||
doc_gen_test() ->
|
doc_gen_test() ->
|
||||||
|
%% the json file too large to encode.
|
||||||
|
{
|
||||||
|
timeout,
|
||||||
|
60,
|
||||||
|
fun() ->
|
||||||
Dir = "tmp",
|
Dir = "tmp",
|
||||||
ok = filelib:ensure_dir(filename:join("tmp", foo)),
|
ok = filelib:ensure_dir(filename:join("tmp", foo)),
|
||||||
I18nFile = filename:join(["_build", "test", "lib", "emqx_dashboard", "etc", "i18n.conf.all"]),
|
I18nFile = filename:join([
|
||||||
|
"_build",
|
||||||
|
"test",
|
||||||
|
"lib",
|
||||||
|
"emqx_dashboard",
|
||||||
|
"etc",
|
||||||
|
"i18n.conf.all"
|
||||||
|
]),
|
||||||
_ = emqx_conf:dump_schema(Dir, emqx_conf_schema, I18nFile),
|
_ = emqx_conf:dump_schema(Dir, emqx_conf_schema, I18nFile),
|
||||||
ok.
|
ok
|
||||||
|
end
|
||||||
|
}.
|
||||||
|
|
|
@ -7,8 +7,22 @@
|
||||||
-include_lib("eunit/include/eunit.hrl").
|
-include_lib("eunit/include/eunit.hrl").
|
||||||
|
|
||||||
doc_gen_test() ->
|
doc_gen_test() ->
|
||||||
|
%% the json file too large to encode.
|
||||||
|
{
|
||||||
|
timeout,
|
||||||
|
60,
|
||||||
|
fun() ->
|
||||||
Dir = "tmp",
|
Dir = "tmp",
|
||||||
ok = filelib:ensure_dir(filename:join("tmp", foo)),
|
ok = filelib:ensure_dir(filename:join("tmp", foo)),
|
||||||
I18nFile = filename:join(["_build", "test", "lib", "emqx_dashboard", "etc", "i18n.conf.all"]),
|
I18nFile = filename:join([
|
||||||
|
"_build",
|
||||||
|
"test",
|
||||||
|
"lib",
|
||||||
|
"emqx_dashboard",
|
||||||
|
"etc",
|
||||||
|
"i18n.conf.all"
|
||||||
|
]),
|
||||||
_ = emqx_conf:dump_schema(Dir, emqx_enterprise_conf_schema, I18nFile),
|
_ = emqx_conf:dump_schema(Dir, emqx_enterprise_conf_schema, I18nFile),
|
||||||
ok.
|
ok
|
||||||
|
end
|
||||||
|
}.
|
||||||
|
|
Loading…
Reference in New Issue