@@ -1171,13 +1171,14 @@ execute_on_each_node(M, F, A) ->
1171
1171
lists :map (fun ({NodeName , _ , _ }) -> rpc (NodeName , M , F , A ) end , get_hosts ()).
1172
1172
1173
1173
mock_inet () ->
1174
- % % We don't want to mock inet module itself to avoid strange networking issues
1175
- meck :new (mod_global_distrib_utils , [non_strict , passthrough , unstick ]),
1176
- meck :expect (mod_global_distrib_utils , getaddrs , fun (_ , inet ) -> {ok , [{127 , 0 , 0 , 1 }]};
1177
- (_ , inet6 ) -> {error , " No ipv6 address" } end ).
1174
+ % % We can only mock MongooseIM modules on mim1.
1175
+ % % Otherwise meck will freeze calling cover_server process.
1176
+ meck :new (inet , [non_strict , passthrough , unstick ]),
1177
+ meck :expect (inet , getaddrs , fun (_ , inet ) -> {ok , [{127 , 0 , 0 , 1 }]};
1178
+ (_ , inet6 ) -> {error , " No ipv6 address" } end ).
1178
1179
1179
1180
unmock_inet (_Pids ) ->
1180
- execute_on_each_node (meck , unload , [mod_global_distrib_utils ]).
1181
+ execute_on_each_node (meck , unload , [inet ]).
1181
1182
1182
1183
out_connection_sups (Node ) ->
1183
1184
Children = rpc (Node , supervisor , which_children , [mod_global_distrib_outgoing_conns_sup ]),
0 commit comments