Skip to content

Commit

Permalink
Remove wait_for_dns
Browse files Browse the repository at this point in the history
  • Loading branch information
arcusfelis committed Nov 17, 2023
1 parent 5d76f22 commit afa29df
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/config/mongoose_config_spec.erl
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,9 @@ internal_database_cets() ->
<<"cluster_name">> => #option{type = atom, validate = non_empty},
%% Relative to the release directory (or an absolute name)
<<"node_list_file">> => #option{type = string,
validate = filename},
<<"wait_for_dns">> => #option{type = boolean}
validate = filename}
},
defaults = #{<<"backend">> => rdbms, <<"cluster_name">> => mongooseim,
<<"wait_for_dns">> => false}
defaults = #{<<"backend">> => rdbms, <<"cluster_name">> => mongooseim}
}.

%% path: internal_databases.mnesia
Expand Down
5 changes: 2 additions & 3 deletions src/mongoose_cets_discovery.erl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ supervisor_specs() ->

supervisor_specs(disabled) ->
[];
supervisor_specs(#{backend := DiscoBackend, cluster_name := ClusterName, wait_for_dns := WaitForDNS} = Opts) ->
supervisor_specs(#{backend := DiscoBackend, cluster_name := ClusterName} = Opts) ->
DiscoFile =
case {DiscoBackend, Opts} of
{file, #{node_list_file := NodeFile}} ->
Expand All @@ -33,8 +33,7 @@ supervisor_specs(#{backend := DiscoBackend, cluster_name := ClusterName, wait_fo
backend_module => disco_backend_to_module(DiscoBackend),
cluster_name => atom_to_binary(ClusterName),
node_name_to_insert => atom_to_binary(node(), latin1),
name => mongoose_cets_discovery, disco_file => DiscoFile,
wait_for_dns => WaitForDNS},
name => mongoose_cets_discovery, disco_file => DiscoFile},
CetsDisco =
{cets_discovery,
{?MODULE, start_link, [DiscoOpts]},
Expand Down
4 changes: 2 additions & 2 deletions test/common/config_parser_helper.erl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ options("miscellaneous") ->
{hosts, [<<"localhost">>, <<"anonymous.localhost">>]},
{internal_databases,
#{cets =>
#{backend => rdbms, cluster_name => mongooseim, wait_for_dns => false},
#{backend => rdbms, cluster_name => mongooseim},
mnesia => #{}}},
{language, <<"en">>},
{listen,
Expand Down Expand Up @@ -145,7 +145,7 @@ options("mongooseim-pgsql") ->
[<<"localhost">>, <<"anonymous.localhost">>, <<"localhost.bis">>]},
{internal_databases,
#{cets =>
#{backend => rdbms, cluster_name => mongooseim, wait_for_dns => false},
#{backend => rdbms, cluster_name => mongooseim},
mnesia => #{}}},
{language, <<"en">>},
{listen,
Expand Down
1 change: 0 additions & 1 deletion test/config_parser_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,6 @@ internal_database_cets(_Config) ->
#{<<"internal_databases">> => #{<<"cets">> => #{<<"cluster_name">> => <<"test">>}}}),

?cfg([internal_databases, cets, cluster_name], mongooseim, CetsEnabled),
?cfg([internal_databases, cets, wait_for_dns], false, CetsEnabled),
?cfg([internal_databases, cets, node_list_file], "/dev/null", CetsFile),
%% If only mnesia section is defined, CETS section is not included
?cfg([internal_databases], #{mnesia => #{}},
Expand Down

0 comments on commit afa29df

Please sign in to comment.