Merge pull request #9764 from zmstone/0114-boot-log-emqx.conf-missing
0114 boot log emqx.conf missing
This commit is contained in:
commit
75a1619793
1
bin/emqx
1
bin/emqx
|
@ -456,6 +456,7 @@ if [ "$IS_ENTERPRISE" = 'yes' ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$IS_BOOT_COMMAND" = 'yes' ]; then
|
if [ "$IS_BOOT_COMMAND" = 'yes' ]; then
|
||||||
|
[ -f "$EMQX_ETC_DIR"/emqx.conf ] || die "emqx.conf is not found in $EMQX_ETC_DIR" 1
|
||||||
if [ "${EMQX_BOOT_CONFIGS:-}" = '' ]; then
|
if [ "${EMQX_BOOT_CONFIGS:-}" = '' ]; then
|
||||||
EMQX_BOOT_CONFIGS="$(call_hocon -s "$SCHEMA_MOD" -c "$EMQX_ETC_DIR"/emqx.conf multi_get "${CONF_KEYS[@]}")"
|
EMQX_BOOT_CONFIGS="$(call_hocon -s "$SCHEMA_MOD" -c "$EMQX_ETC_DIR"/emqx.conf multi_get "${CONF_KEYS[@]}")"
|
||||||
## export here so the 'console' command recursively called from
|
## export here so the 'console' command recursively called from
|
||||||
|
|
|
@ -32,6 +32,21 @@
|
||||||
-define(PROXY_HOST, "toxiproxy").
|
-define(PROXY_HOST, "toxiproxy").
|
||||||
-define(PROXY_PORT, "8474").
|
-define(PROXY_PORT, "8474").
|
||||||
|
|
||||||
|
-define(WAIT(PATTERN, EXPRESSION, TIMEOUT),
|
||||||
|
wait(
|
||||||
|
fun() ->
|
||||||
|
case EXPRESSION of
|
||||||
|
PATTERN ->
|
||||||
|
ok;
|
||||||
|
Other ->
|
||||||
|
ct:pal("ignored wait result: ~p", [Other]),
|
||||||
|
error
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
TIMEOUT
|
||||||
|
)
|
||||||
|
).
|
||||||
|
|
||||||
all() -> [{group, transport_types}, {group, rest}].
|
all() -> [{group, transport_types}, {group, rest}].
|
||||||
|
|
||||||
groups() ->
|
groups() ->
|
||||||
|
@ -156,9 +171,10 @@ t_create_delete_bridge(Config) ->
|
||||||
|
|
||||||
ResourceId = emqx_bridge_resource:resource_id(Type, Name),
|
ResourceId = emqx_bridge_resource:resource_id(Type, Name),
|
||||||
|
|
||||||
?assertEqual(
|
?WAIT(
|
||||||
{ok, connected},
|
{ok, connected},
|
||||||
emqx_resource:health_check(ResourceId)
|
emqx_resource:health_check(ResourceId),
|
||||||
|
5
|
||||||
),
|
),
|
||||||
|
|
||||||
RedisType = atom_to_binary(Type),
|
RedisType = atom_to_binary(Type),
|
||||||
|
@ -224,11 +240,11 @@ t_check_replay(Config) ->
|
||||||
),
|
),
|
||||||
|
|
||||||
ResourceId = emqx_bridge_resource:resource_id(Type, Name),
|
ResourceId = emqx_bridge_resource:resource_id(Type, Name),
|
||||||
Health = emqx_resource:health_check(ResourceId),
|
|
||||||
|
|
||||||
?assertEqual(
|
?WAIT(
|
||||||
{ok, connected},
|
{ok, connected},
|
||||||
Health
|
emqx_resource:health_check(ResourceId),
|
||||||
|
5
|
||||||
),
|
),
|
||||||
|
|
||||||
?check_trace(
|
?check_trace(
|
||||||
|
@ -508,3 +524,14 @@ publish_message(Topic, Payload) ->
|
||||||
{ok, _} = emqtt:connect(Client),
|
{ok, _} = emqtt:connect(Client),
|
||||||
ok = emqtt:publish(Client, Topic, Payload),
|
ok = emqtt:publish(Client, Topic, Payload),
|
||||||
ok = emqtt:stop(Client).
|
ok = emqtt:stop(Client).
|
||||||
|
|
||||||
|
wait(_F, 0) ->
|
||||||
|
error(timeout);
|
||||||
|
wait(F, Attempt) ->
|
||||||
|
case F() of
|
||||||
|
ok ->
|
||||||
|
ok;
|
||||||
|
_ ->
|
||||||
|
timer:sleep(1000),
|
||||||
|
wait(F, Attempt - 1)
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue