Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rework of the gen_mod module, part #1 #3104

Merged
merged 8 commits into from
May 5, 2021
4 changes: 1 addition & 3 deletions test/mongoose_domain_core_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,13 @@ can_get_outdated_domains(_) ->
[] = mongoose_domain_core:get_all_outdated(another_dummy_src).

run_for_each_domains(_) ->
NumOfDomains = 10,
NumOfDomains = 1234,
DenysGonchar marked this conversation as resolved.
Show resolved Hide resolved
NewDomains = [<<"dummy_domain_", (integer_to_binary(N))/binary, ".localhost">>
|| N <- lists:seq(1, NumOfDomains)],
[mongoose_domain_core:insert(Domain, <<"type #3">>, dummy_src) || Domain <- NewDomains],
io:format("!!! Domains = ~p~n", [mongoose_domain_core:get_domains_by_host_type(<<"type #3">>)]),
meck:new(dummy_module, [non_strict]),
meck:expect(dummy_module, for_each_callback, fun(_, _) -> ok end),
mongoose_domain_core:for_each_domain(<<"type #3">>, fun dummy_module:for_each_callback/2),
io:format("!!! Calls = ~p~n", [meck:history(dummy_module)]),
NumOfDomains = meck:num_calls(dummy_module, for_each_callback, 2),
[meck:wait(dummy_module, for_each_callback, [<<"type #3">>, Domain], 0)
|| Domain <- NewDomains],
Expand Down