Roberto Ostinelli 3 лет назад
Родитель
Сommit
4922b96638
5 измененных файлов с 247 добавлено и 195 удалено
  1. 32 6
      src/syn.erl
  2. 22 9
      src/syn_groups.erl
  3. 14 1
      src/syn_registry.erl
  4. 160 160
      test/syn_groups_SUITE.erl
  5. 19 19
      test/syn_registry_SUITE.erl

+ 32 - 6
src/syn.erl

@@ -34,7 +34,8 @@
 -export([lookup/1, lookup/2]).
 -export([register/2, register/3, register/4]).
 -export([unregister/1, unregister/2]).
--export([registry_count/1, registry_count/2]).
+-export([registry_count/0, registry_count/1, registry_count/2]).
+-export([local_registry_count/0, local_registry_count/1]).
 %% gen_server via interface
 -export([register_name/2, unregister_name/1, whereis_name/1, send/2]).
 %% groups
@@ -44,7 +45,8 @@
 -export([is_local_member/2, is_local_member/3]).
 -export([join/2, join/3, join/4]).
 -export([leave/2, leave/3]).
--export([groups_count/1, groups_count/2]).
+-export([group_count/0, group_count/1, group_count/2]).
+-export([local_group_count/0, local_group_count/1]).
 -export([group_names/0, group_names/1, group_names/2]).
 -export([local_group_names/0, local_group_names/1]).
 -export([publish/2, publish/3]).
@@ -111,6 +113,10 @@ unregister(Name) ->
 unregister(Scope, Name) ->
     syn_registry:unregister(Scope, Name).
 
+-spec registry_count() -> non_neg_integer().
+registry_count() ->
+    syn_registry:count().
+
 -spec registry_count(Scope :: atom()) -> non_neg_integer().
 registry_count(Scope) ->
     syn_registry:count(Scope).
@@ -119,6 +125,14 @@ registry_count(Scope) ->
 registry_count(Scope, Node) ->
     syn_registry:count(Scope, Node).
 
+-spec local_registry_count() -> non_neg_integer().
+local_registry_count() ->
+    syn_registry:local_count().
+
+-spec local_registry_count(Scope :: atom()) -> non_neg_integer().
+local_registry_count(Scope) ->
+    syn_registry:local_count(Scope).
+
 %% ----- \/ gen_server via module interface --------------------------
 -spec register_name(Name :: any(), Pid :: pid()) -> yes | no.
 register_name(Name, Pid) ->
@@ -204,14 +218,26 @@ leave(GroupName, Pid) ->
 leave(Scope, GroupName, Pid) ->
     syn_groups:leave(Scope, GroupName, Pid).
 
--spec groups_count(Scope :: atom()) -> non_neg_integer().
-groups_count(Scope) ->
+-spec group_count() -> non_neg_integer().
+group_count() ->
+    syn_groups:count().
+
+-spec group_count(Scope :: atom()) -> non_neg_integer().
+group_count(Scope) ->
     syn_groups:count(Scope).
 
--spec groups_count(Scope :: atom(), Node :: node()) -> non_neg_integer().
-groups_count(Scope, Node) ->
+-spec group_count(Scope :: atom(), Node :: node()) -> non_neg_integer().
+group_count(Scope, Node) ->
     syn_groups:count(Scope, Node).
 
+-spec local_group_count() -> non_neg_integer().
+local_group_count() ->
+    syn_groups:local_count().
+
+-spec local_group_count(Scope :: atom()) -> non_neg_integer().
+local_group_count(Scope) ->
+    syn_groups:local_count(Scope).
+
 -spec group_names() -> [GroupName :: term()].
 group_names() ->
     syn_groups:group_names().

+ 22 - 9
src/syn_groups.erl

@@ -35,7 +35,8 @@
 -export([is_member/2, is_member/3]).
 -export([local_members/1, local_members/2]).
 -export([is_local_member/2, is_local_member/3]).
--export([count/1, count/2]).
+-export([count/0, count/1, count/2]).
+-export([local_count/0, local_count/1]).
 -export([group_names/0, group_names/1, group_names/2]).
 -export([local_group_names/0, local_group_names/1]).
 -export([publish/2, publish/3]).
@@ -190,6 +191,10 @@ leave(Scope, GroupName, Pid) ->
             end
     end.
 
+-spec count() -> non_neg_integer().
+count() ->
+    count(?DEFAULT_SCOPE).
+
 -spec count(Scope :: atom()) -> non_neg_integer().
 count(Scope) ->
     do_count(Scope, '_').
@@ -198,6 +203,14 @@ count(Scope) ->
 count(Scope, Node) ->
     do_count(Scope, Node).
 
+-spec local_count() -> non_neg_integer().
+local_count() ->
+    count(?DEFAULT_SCOPE, node()).
+
+-spec local_count(Scope :: atom()) -> non_neg_integer().
+local_count(Scope) ->
+    count(Scope, node()).
+
 -spec do_count(Scope :: atom(), NodeParam :: atom()) -> non_neg_integer().
 do_count(Scope, NodeParam) ->
     case syn_backbone:get_table_name(syn_groups_by_name, Scope) of
@@ -226,6 +239,14 @@ group_names(Scope) ->
 group_names(Scope, Node) ->
     do_group_names(Scope, Node).
 
+-spec local_group_names() -> [GroupName :: term()].
+local_group_names() ->
+    group_names(?DEFAULT_SCOPE, node()).
+
+-spec local_group_names(Scope :: atom()) -> [GroupName :: term()].
+local_group_names(Scope) ->
+    group_names(Scope, node()).
+
 -spec do_group_names(Scope :: atom(), Node :: node()) -> [GroupName :: term()].
 do_group_names(Scope, NodeParam) ->
     case syn_backbone:get_table_name(syn_groups_by_name, Scope) of
@@ -242,14 +263,6 @@ do_group_names(Scope, NodeParam) ->
             ordsets:to_list(Set)
     end.
 
--spec local_group_names() -> [GroupName :: term()].
-local_group_names() ->
-    group_names(?DEFAULT_SCOPE, node()).
-
--spec local_group_names(Scope :: atom()) -> [GroupName :: term()].
-local_group_names(Scope) ->
-    group_names(Scope, node()).
-
 -spec publish(GroupName :: any(), Message :: any()) -> {ok, RecipientCount :: non_neg_integer()}.
 publish(GroupName, Message) ->
     publish(?DEFAULT_SCOPE, GroupName, Message).

+ 14 - 1
src/syn_registry.erl

@@ -32,7 +32,8 @@
 -export([lookup/1, lookup/2]).
 -export([register/2, register/3, register/4]).
 -export([unregister/1, unregister/2]).
--export([count/1, count/2]).
+-export([count/0, count/1, count/2]).
+-export([local_count/0, local_count/1]).
 
 %% syn_gen_scope callbacks
 -export([
@@ -141,6 +142,10 @@ unregister(Scope, Name) ->
             end
     end.
 
+-spec count() -> non_neg_integer().
+count() ->
+    count(?DEFAULT_SCOPE).
+
 -spec count(Scope :: atom()) -> non_neg_integer().
 count(Scope) ->
     TableByName = syn_backbone:get_table_name(syn_registry_by_name, Scope),
@@ -163,6 +168,14 @@ count(Scope, Node) ->
             }])
     end.
 
+-spec local_count() -> non_neg_integer().
+local_count() ->
+    count(?DEFAULT_SCOPE, node()).
+
+-spec local_count(Scope :: atom()) -> non_neg_integer().
+local_count(Scope) ->
+    count(Scope, node()).
+
 %% ===================================================================
 %% Callbacks
 %% ===================================================================

+ 160 - 160
test/syn_groups_SUITE.erl

@@ -432,10 +432,10 @@ three_nodes_join_leave_and_monitor_default_scope(Config) ->
     false = rpc:call(SlaveNode2, syn, is_local_member, [{group, "two"}, PidWithMeta]),
     false = rpc:call(SlaveNode2, syn, is_local_member, [{group, "two"}, PidRemoteOn1]),
 
-    0 = syn:groups_count(default),
-    0 = syn:groups_count(default, node()),
-    0 = syn:groups_count(default, SlaveNode1),
-    0 = syn:groups_count(default, SlaveNode2),
+    0 = syn:group_count(),
+    0 = syn:group_count(default, node()),
+    0 = syn:group_count(default, SlaveNode1),
+    0 = syn:group_count(default, SlaveNode2),
 
     %% join
     ok = syn:join({group, "one"}, Pid),
@@ -537,10 +537,10 @@ three_nodes_join_leave_and_monitor_default_scope(Config) ->
     false = rpc:call(SlaveNode2, syn, is_local_member, [{group, "two"}, PidWithMeta]),
     false = rpc:call(SlaveNode2, syn, is_local_member, [{group, "two"}, PidRemoteOn1]),
 
-    2 = syn:groups_count(default),
-    2 = syn:groups_count(default, node()),
-    1 = syn:groups_count(default, SlaveNode1),
-    0 = syn:groups_count(default, SlaveNode2),
+    2 = syn:group_count(),
+    2 = syn:group_count(default, node()),
+    1 = syn:group_count(default, SlaveNode1),
+    0 = syn:group_count(default, SlaveNode2),
 
     %% re-join to edit meta
     ok = syn:join({group, "one"}, PidWithMeta, <<"with updated meta">>),
@@ -599,10 +599,10 @@ three_nodes_join_leave_and_monitor_default_scope(Config) ->
         fun() -> lists:sort(rpc:call(SlaveNode2, syn, local_members, [{group, "two"}])) end
     ),
 
-    2 = syn:groups_count(default),
-    2 = syn:groups_count(default, node()),
-    1 = syn:groups_count(default, SlaveNode1),
-    0 = syn:groups_count(default, SlaveNode2),
+    2 = syn:group_count(),
+    2 = syn:group_count(default, node()),
+    1 = syn:group_count(default, SlaveNode1),
+    0 = syn:group_count(default, SlaveNode2),
 
     %% crash scope process to ensure that monitors get recreated
     exit(whereis(syn_groups_default), kill),
@@ -703,10 +703,10 @@ three_nodes_join_leave_and_monitor_default_scope(Config) ->
     false = rpc:call(SlaveNode2, syn, is_local_member, [{group, "two"}, PidWithMeta]),
     false = rpc:call(SlaveNode2, syn, is_local_member, [{group, "two"}, PidRemoteOn1]),
 
-    1 = syn:groups_count(default),
-    1 = syn:groups_count(default, node()),
-    0 = syn:groups_count(default, SlaveNode1),
-    0 = syn:groups_count(default, SlaveNode2),
+    1 = syn:group_count(),
+    1 = syn:group_count(default, node()),
+    0 = syn:group_count(default, SlaveNode1),
+    0 = syn:group_count(default, SlaveNode2),
 
     %% errors
     {error, not_in_group} = syn:leave({group, "one"}, PidWithMeta).
@@ -894,30 +894,30 @@ three_nodes_join_leave_and_monitor_custom_scope(Config) ->
         fun() -> lists:sort(rpc:call(SlaveNode2, syn, local_members, [custom_scope_bc, {group, "two"}])) end
     ),
 
-    2 = syn:groups_count(custom_scope_ab),
-    2 = syn:groups_count(custom_scope_ab, node()),
-    0 = syn:groups_count(custom_scope_ab, SlaveNode1),
-    0 = syn:groups_count(custom_scope_ab, SlaveNode2),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, node()),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, SlaveNode1),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, SlaveNode2),
-    2 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_ab]),
-    2 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_ab, node()]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_ab, SlaveNode1]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_ab, SlaveNode2]),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, node()]),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, SlaveNode1]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, SlaveNode2]),
-    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, groups_count, [custom_scope_ab]),
-    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, groups_count, [custom_scope_ab, node()]),
-    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, groups_count, [custom_scope_ab, SlaveNode1]),
-    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, groups_count, [custom_scope_ab, SlaveNode2]),
-    1 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, node()]),
-    1 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, SlaveNode1]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, SlaveNode2]),
+    2 = syn:group_count(custom_scope_ab),
+    2 = syn:group_count(custom_scope_ab, node()),
+    0 = syn:group_count(custom_scope_ab, SlaveNode1),
+    0 = syn:group_count(custom_scope_ab, SlaveNode2),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, node()),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, SlaveNode1),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, SlaveNode2),
+    2 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_ab]),
+    2 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_ab, node()]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_ab, SlaveNode1]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_ab, SlaveNode2]),
+    1 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, node()]),
+    1 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, SlaveNode1]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, SlaveNode2]),
+    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, group_count, [custom_scope_ab]),
+    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, group_count, [custom_scope_ab, node()]),
+    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, group_count, [custom_scope_ab, SlaveNode1]),
+    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, group_count, [custom_scope_ab, SlaveNode2]),
+    1 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc]),
+    0 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, node()]),
+    1 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, SlaveNode1]),
+    0 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, SlaveNode2]),
 
     %% re-join to edit meta
     ok = syn:join(custom_scope_ab, {group, "one"}, PidWithMeta, <<"with updated meta">>),
@@ -984,30 +984,30 @@ three_nodes_join_leave_and_monitor_custom_scope(Config) ->
         fun() -> lists:sort(rpc:call(SlaveNode2, syn, local_members, [custom_scope_bc, {group, "two"}])) end
     ),
 
-    2 = syn:groups_count(custom_scope_ab),
-    2 = syn:groups_count(custom_scope_ab, node()),
-    0 = syn:groups_count(custom_scope_ab, SlaveNode1),
-    0 = syn:groups_count(custom_scope_ab, SlaveNode2),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, node()),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, SlaveNode1),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, SlaveNode2),
-    2 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_ab]),
-    2 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_ab, node()]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_ab, SlaveNode1]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_ab, SlaveNode2]),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, node()]),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, SlaveNode1]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, SlaveNode2]),
-    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, groups_count, [custom_scope_ab]),
-    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, groups_count, [custom_scope_ab, node()]),
-    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, groups_count, [custom_scope_ab, SlaveNode1]),
-    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, groups_count, [custom_scope_ab, SlaveNode2]),
-    1 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, node()]),
-    1 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, SlaveNode1]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, SlaveNode2]),
+    2 = syn:group_count(custom_scope_ab),
+    2 = syn:group_count(custom_scope_ab, node()),
+    0 = syn:group_count(custom_scope_ab, SlaveNode1),
+    0 = syn:group_count(custom_scope_ab, SlaveNode2),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, node()),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, SlaveNode1),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, SlaveNode2),
+    2 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_ab]),
+    2 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_ab, node()]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_ab, SlaveNode1]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_ab, SlaveNode2]),
+    1 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, node()]),
+    1 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, SlaveNode1]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, SlaveNode2]),
+    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, group_count, [custom_scope_ab]),
+    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, group_count, [custom_scope_ab, node()]),
+    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, group_count, [custom_scope_ab, SlaveNode1]),
+    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, group_count, [custom_scope_ab, SlaveNode2]),
+    1 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc]),
+    0 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, node()]),
+    1 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, SlaveNode1]),
+    0 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, SlaveNode2]),
 
     %% crash scope process to ensure that monitors get recreated
     exit(whereis(syn_groups_custom_scope_ab), kill),
@@ -1106,30 +1106,30 @@ three_nodes_join_leave_and_monitor_custom_scope(Config) ->
         [], fun() -> lists:sort(rpc:call(SlaveNode2, syn, local_members, [custom_scope_bc, {group, "two"}])) end
     ),
 
-    1 = syn:groups_count(custom_scope_ab),
-    1 = syn:groups_count(custom_scope_ab, node()),
-    0 = syn:groups_count(custom_scope_ab, SlaveNode1),
-    0 = syn:groups_count(custom_scope_ab, SlaveNode2),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, node()),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, SlaveNode1),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, SlaveNode2),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_ab]),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_ab, node()]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_ab, SlaveNode1]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_ab, SlaveNode2]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, node()]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, SlaveNode1]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, SlaveNode2]),
-    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, groups_count, [custom_scope_ab]),
-    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, groups_count, [custom_scope_ab, node()]),
-    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, groups_count, [custom_scope_ab, SlaveNode1]),
-    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, groups_count, [custom_scope_ab, SlaveNode2]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, node()]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, SlaveNode1]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, SlaveNode2]),
+    1 = syn:group_count(custom_scope_ab),
+    1 = syn:group_count(custom_scope_ab, node()),
+    0 = syn:group_count(custom_scope_ab, SlaveNode1),
+    0 = syn:group_count(custom_scope_ab, SlaveNode2),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, node()),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, SlaveNode1),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, SlaveNode2),
+    1 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_ab]),
+    1 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_ab, node()]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_ab, SlaveNode1]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_ab, SlaveNode2]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, node()]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, SlaveNode1]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, SlaveNode2]),
+    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, group_count, [custom_scope_ab]),
+    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, group_count, [custom_scope_ab, node()]),
+    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, group_count, [custom_scope_ab, SlaveNode1]),
+    {badrpc, {'EXIT', {{invalid_scope, custom_scope_ab}, _}}} = catch rpc:call(SlaveNode2, syn, group_count, [custom_scope_ab, SlaveNode2]),
+    0 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc]),
+    0 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, node()]),
+    0 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, SlaveNode1]),
+    0 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, SlaveNode2]),
 
     %% errors
     {error, not_in_group} = syn:leave(custom_scope_ab, {group, "one"}, PidWithMeta).
@@ -1225,18 +1225,18 @@ three_nodes_cluster_changes(Config) ->
         fun() -> lists:sort(rpc:call(SlaveNode2, syn, local_members, [<<"group-2">>])) end
     ),
 
-    2 = syn:groups_count(default),
-    0 = syn:groups_count(default, node()),
-    1 = syn:groups_count(default, SlaveNode1),
-    2 = syn:groups_count(default, SlaveNode2),
-    2 = rpc:call(SlaveNode1, syn, groups_count, [default]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [default, node()]),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [default, SlaveNode1]),
-    2 = rpc:call(SlaveNode1, syn, groups_count, [default, SlaveNode2]),
-    2 = rpc:call(SlaveNode2, syn, groups_count, [default]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [default, node()]),
-    1 = rpc:call(SlaveNode2, syn, groups_count, [default, SlaveNode1]),
-    2 = rpc:call(SlaveNode2, syn, groups_count, [default, SlaveNode2]),
+    2 = syn:group_count(),
+    0 = syn:group_count(default, node()),
+    1 = syn:group_count(default, SlaveNode1),
+    2 = syn:group_count(default, SlaveNode2),
+    2 = rpc:call(SlaveNode1, syn, group_count, []),
+    0 = rpc:call(SlaveNode1, syn, group_count, [default, node()]),
+    1 = rpc:call(SlaveNode1, syn, group_count, [default, SlaveNode1]),
+    2 = rpc:call(SlaveNode1, syn, group_count, [default, SlaveNode2]),
+    2 = rpc:call(SlaveNode2, syn, group_count, []),
+    0 = rpc:call(SlaveNode2, syn, group_count, [default, node()]),
+    1 = rpc:call(SlaveNode2, syn, group_count, [default, SlaveNode1]),
+    2 = rpc:call(SlaveNode2, syn, group_count, [default, SlaveNode2]),
 
     {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:members(custom_scope_bc, <<"scoped-on-bc">>),
     syn_test_suite_helper:assert_wait(
@@ -1258,18 +1258,18 @@ three_nodes_cluster_changes(Config) ->
         fun() -> lists:sort(rpc:call(SlaveNode2, syn, local_members, [custom_scope_bc, <<"scoped-on-bc">>])) end
     ),
 
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, node()),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, SlaveNode1),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, SlaveNode2),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, node()]),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, SlaveNode1]),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, SlaveNode2]),
-    1 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, node()]),
-    1 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, SlaveNode1]),
-    1 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, SlaveNode2]),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, node()),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, SlaveNode1),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, SlaveNode2),
+    1 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, node()]),
+    1 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, SlaveNode1]),
+    1 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, SlaveNode2]),
+    1 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc]),
+    0 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, node()]),
+    1 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, SlaveNode1]),
+    1 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, SlaveNode2]),
 
     %% partial netsplit (1 cannot see 2)
     rpc:call(SlaveNode1, syn_test_suite_helper, disconnect_node, [SlaveNode2]),
@@ -1330,18 +1330,18 @@ three_nodes_cluster_changes(Config) ->
         fun() -> lists:sort(rpc:call(SlaveNode2, syn, local_members, [<<"group-2">>])) end
     ),
 
-    2 = syn:groups_count(default),
-    0 = syn:groups_count(default, node()),
-    1 = syn:groups_count(default, SlaveNode1),
-    2 = syn:groups_count(default, SlaveNode2),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [default]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [default, node()]),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [default, SlaveNode1]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [default, SlaveNode2]),
-    2 = rpc:call(SlaveNode2, syn, groups_count, [default]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [default, node()]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [default, SlaveNode1]),
-    2 = rpc:call(SlaveNode2, syn, groups_count, [default, SlaveNode2]),
+    2 = syn:group_count(),
+    0 = syn:group_count(default, node()),
+    1 = syn:group_count(default, SlaveNode1),
+    2 = syn:group_count(default, SlaveNode2),
+    1 = rpc:call(SlaveNode1, syn, group_count, []),
+    0 = rpc:call(SlaveNode1, syn, group_count, [default, node()]),
+    1 = rpc:call(SlaveNode1, syn, group_count, [default, SlaveNode1]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [default, SlaveNode2]),
+    2 = rpc:call(SlaveNode2, syn, group_count, []),
+    0 = rpc:call(SlaveNode2, syn, group_count, [default, node()]),
+    0 = rpc:call(SlaveNode2, syn, group_count, [default, SlaveNode1]),
+    2 = rpc:call(SlaveNode2, syn, group_count, [default, SlaveNode2]),
 
     {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:members(custom_scope_bc, <<"scoped-on-bc">>),
     syn_test_suite_helper:assert_wait(
@@ -1363,18 +1363,18 @@ three_nodes_cluster_changes(Config) ->
         fun() -> lists:sort(rpc:call(SlaveNode2, syn, local_members, [custom_scope_bc, <<"scoped-on-bc">>])) end
     ),
 
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, node()),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, SlaveNode1),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, SlaveNode2),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, node()]),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, SlaveNode1]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, SlaveNode2]),
-    1 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, node()]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, SlaveNode1]),
-    1 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, SlaveNode2]),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, node()),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, SlaveNode1),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, SlaveNode2),
+    1 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, node()]),
+    1 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, SlaveNode1]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, SlaveNode2]),
+    1 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc]),
+    0 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, node()]),
+    0 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, SlaveNode1]),
+    1 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, SlaveNode2]),
 
     %% re-join
     rpc:call(SlaveNode1, syn_test_suite_helper, connect_node, [SlaveNode2]),
@@ -1435,18 +1435,18 @@ three_nodes_cluster_changes(Config) ->
         fun() -> lists:sort(rpc:call(SlaveNode2, syn, local_members, [<<"group-2">>])) end
     ),
 
-    2 = syn:groups_count(default),
-    0 = syn:groups_count(default, node()),
-    1 = syn:groups_count(default, SlaveNode1),
-    2 = syn:groups_count(default, SlaveNode2),
-    2 = rpc:call(SlaveNode1, syn, groups_count, [default]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [default, node()]),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [default, SlaveNode1]),
-    2 = rpc:call(SlaveNode1, syn, groups_count, [default, SlaveNode2]),
-    2 = rpc:call(SlaveNode2, syn, groups_count, [default]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [default, node()]),
-    1 = rpc:call(SlaveNode2, syn, groups_count, [default, SlaveNode1]),
-    2 = rpc:call(SlaveNode2, syn, groups_count, [default, SlaveNode2]),
+    2 = syn:group_count(),
+    0 = syn:group_count(default, node()),
+    1 = syn:group_count(default, SlaveNode1),
+    2 = syn:group_count(default, SlaveNode2),
+    2 = rpc:call(SlaveNode1, syn, group_count, []),
+    0 = rpc:call(SlaveNode1, syn, group_count, [default, node()]),
+    1 = rpc:call(SlaveNode1, syn, group_count, [default, SlaveNode1]),
+    2 = rpc:call(SlaveNode1, syn, group_count, [default, SlaveNode2]),
+    2 = rpc:call(SlaveNode2, syn, group_count, []),
+    0 = rpc:call(SlaveNode2, syn, group_count, [default, node()]),
+    1 = rpc:call(SlaveNode2, syn, group_count, [default, SlaveNode1]),
+    2 = rpc:call(SlaveNode2, syn, group_count, [default, SlaveNode2]),
 
     {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:members(custom_scope_bc, <<"scoped-on-bc">>),
     syn_test_suite_helper:assert_wait(
@@ -1468,18 +1468,18 @@ three_nodes_cluster_changes(Config) ->
         fun() -> lists:sort(rpc:call(SlaveNode2, syn, local_members, [custom_scope_bc, <<"scoped-on-bc">>])) end
     ),
 
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, node()),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, SlaveNode1),
-    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:groups_count(custom_scope_bc, SlaveNode2),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc]),
-    0 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, node()]),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, SlaveNode1]),
-    1 = rpc:call(SlaveNode1, syn, groups_count, [custom_scope_bc, SlaveNode2]),
-    1 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc]),
-    0 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, node()]),
-    1 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, SlaveNode1]),
-    1 = rpc:call(SlaveNode2, syn, groups_count, [custom_scope_bc, SlaveNode2]).
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, node()),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, SlaveNode1),
+    {'EXIT', {{invalid_scope, custom_scope_bc}, _}} = catch syn:group_count(custom_scope_bc, SlaveNode2),
+    1 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc]),
+    0 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, node()]),
+    1 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, SlaveNode1]),
+    1 = rpc:call(SlaveNode1, syn, group_count, [custom_scope_bc, SlaveNode2]),
+    1 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc]),
+    0 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, node()]),
+    1 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, SlaveNode1]),
+    1 = rpc:call(SlaveNode2, syn, group_count, [custom_scope_bc, SlaveNode2]).
 
 three_nodes_custom_event_handler_joined_left(Config) ->
     %% get slaves

+ 19 - 19
test/syn_registry_SUITE.erl

@@ -409,7 +409,7 @@ three_nodes_register_unregister_and_monitor_default_scope(Config) ->
     undefined = syn:lookup({remote_pid_on, slave_1}),
     undefined = rpc:call(SlaveNode1, syn, lookup, [{remote_pid_on, slave_1}]),
     undefined = rpc:call(SlaveNode2, syn, lookup, [{remote_pid_on, slave_1}]),
-    0 = syn:registry_count(default),
+    0 = syn:registry_count(),
     0 = syn:registry_count(default, node()),
     0 = syn:registry_count(default, SlaveNode1),
     0 = syn:registry_count(default, SlaveNode2),
@@ -473,7 +473,7 @@ three_nodes_register_unregister_and_monitor_default_scope(Config) ->
         {PidRemoteOn1, undefined},
         fun() -> rpc:call(SlaveNode2, syn, lookup, [{remote_pid_on, slave_1}]) end
     ),
-    4 = syn:registry_count(default),
+    4 = syn:registry_count(),
     3 = syn:registry_count(default, node()),
     1 = syn:registry_count(default, SlaveNode1),
     0 = syn:registry_count(default, SlaveNode2),
@@ -507,7 +507,7 @@ three_nodes_register_unregister_and_monitor_default_scope(Config) ->
         {PidRemoteOn1, added_meta},
         fun() -> rpc:call(SlaveNode2, syn, lookup, [{remote_pid_on, slave_1}]) end
     ),
-    4 = syn:registry_count(default),
+    4 = syn:registry_count(),
     3 = syn:registry_count(default, node()),
     1 = syn:registry_count(default, SlaveNode1),
     0 = syn:registry_count(default, SlaveNode2),
@@ -571,7 +571,7 @@ three_nodes_register_unregister_and_monitor_default_scope(Config) ->
         undefined,
         fun() -> rpc:call(SlaveNode2, syn, lookup, [{remote_pid_on, slave_1}]) end
     ),
-    0 = syn:registry_count(default),
+    0 = syn:registry_count(),
     0 = syn:registry_count(default, node()),
     0 = syn:registry_count(default, SlaveNode1),
     0 = syn:registry_count(default, SlaveNode2),
@@ -892,15 +892,15 @@ three_nodes_cluster_changes(Config) ->
         {PidRemoteOn2, "meta-2"},
         fun() -> rpc:call(SlaveNode2, syn, lookup, ["proc-2"]) end
     ),
-    2 = syn:registry_count(default),
+    2 = syn:registry_count(),
     0 = syn:registry_count(default, node()),
     1 = syn:registry_count(default, SlaveNode1),
     1 = syn:registry_count(default, SlaveNode2),
-    2 = rpc:call(SlaveNode1, syn, registry_count, [default]),
+    2 = rpc:call(SlaveNode1, syn, registry_count, []),
     0 = rpc:call(SlaveNode1, syn, registry_count, [default, node()]),
     1 = rpc:call(SlaveNode1, syn, registry_count, [default, SlaveNode1]),
     1 = rpc:call(SlaveNode1, syn, registry_count, [default, SlaveNode2]),
-    2 = rpc:call(SlaveNode2, syn, registry_count, [default]),
+    2 = rpc:call(SlaveNode2, syn, registry_count, []),
     0 = rpc:call(SlaveNode2, syn, registry_count, [default, node()]),
     1 = rpc:call(SlaveNode2, syn, registry_count, [default, SlaveNode1]),
     1 = rpc:call(SlaveNode2, syn, registry_count, [default, SlaveNode2]),
@@ -967,15 +967,15 @@ three_nodes_cluster_changes(Config) ->
         {PidRemoteOn2, "meta-2"},
         fun() -> rpc:call(SlaveNode2, syn, lookup, ["proc-2"]) end
     ),
-    2 = syn:registry_count(default),
+    2 = syn:registry_count(),
     0 = syn:registry_count(default, node()),
     1 = syn:registry_count(default, SlaveNode1),
     1 = syn:registry_count(default, SlaveNode2),
-    1 = rpc:call(SlaveNode1, syn, registry_count, [default]),
+    1 = rpc:call(SlaveNode1, syn, registry_count, []),
     0 = rpc:call(SlaveNode1, syn, registry_count, [default, node()]),
     1 = rpc:call(SlaveNode1, syn, registry_count, [default, SlaveNode1]),
     0 = rpc:call(SlaveNode1, syn, registry_count, [default, SlaveNode2]),
-    1 = rpc:call(SlaveNode2, syn, registry_count, [default]),
+    1 = rpc:call(SlaveNode2, syn, registry_count, []),
     0 = rpc:call(SlaveNode2, syn, registry_count, [default, node()]),
     0 = rpc:call(SlaveNode2, syn, registry_count, [default, SlaveNode1]),
     1 = rpc:call(SlaveNode2, syn, registry_count, [default, SlaveNode2]),
@@ -1039,15 +1039,15 @@ three_nodes_cluster_changes(Config) ->
         {PidRemoteOn2, "meta-2"},
         fun() -> rpc:call(SlaveNode2, syn, lookup, ["proc-2"]) end
     ),
-    2 = syn:registry_count(default),
+    2 = syn:registry_count(),
     0 = syn:registry_count(default, node()),
     1 = syn:registry_count(default, SlaveNode1),
     1 = syn:registry_count(default, SlaveNode2),
-    2 = rpc:call(SlaveNode1, syn, registry_count, [default]),
+    2 = rpc:call(SlaveNode1, syn, registry_count, []),
     0 = rpc:call(SlaveNode1, syn, registry_count, [default, node()]),
     1 = rpc:call(SlaveNode1, syn, registry_count, [default, SlaveNode1]),
     1 = rpc:call(SlaveNode1, syn, registry_count, [default, SlaveNode2]),
-    2 = rpc:call(SlaveNode2, syn, registry_count, [default]),
+    2 = rpc:call(SlaveNode2, syn, registry_count, []),
     0 = rpc:call(SlaveNode2, syn, registry_count, [default, node()]),
     1 = rpc:call(SlaveNode2, syn, registry_count, [default, SlaveNode1]),
     1 = rpc:call(SlaveNode2, syn, registry_count, [default, SlaveNode2]),
@@ -1129,15 +1129,15 @@ three_nodes_cluster_conflicts(Config) ->
         {Pid2RemoteOn2, "meta-2"},
         fun() -> rpc:call(SlaveNode2, syn, lookup, ["proc-confict-by-netsplit"]) end
     ),
-    1 = syn:registry_count(default),
+    1 = syn:registry_count(),
     0 = syn:registry_count(default, node()),
     0 = syn:registry_count(default, SlaveNode1),
     1 = syn:registry_count(default, SlaveNode2),
-    1 = rpc:call(SlaveNode1, syn, registry_count, [default]),
+    1 = rpc:call(SlaveNode1, syn, registry_count, []),
     0 = rpc:call(SlaveNode1, syn, registry_count, [default, node()]),
     0 = rpc:call(SlaveNode1, syn, registry_count, [default, SlaveNode1]),
     1 = rpc:call(SlaveNode1, syn, registry_count, [default, SlaveNode2]),
-    1 = rpc:call(SlaveNode2, syn, registry_count, [default]),
+    1 = rpc:call(SlaveNode2, syn, registry_count, []),
     0 = rpc:call(SlaveNode2, syn, registry_count, [default, node()]),
     0 = rpc:call(SlaveNode2, syn, registry_count, [default, SlaveNode1]),
     1 = rpc:call(SlaveNode2, syn, registry_count, [default, SlaveNode2]),
@@ -1463,15 +1463,15 @@ three_nodes_custom_event_handler_conflict_resolution(Config) ->
         {PidOn1, keepthis},
         fun() -> rpc:call(SlaveNode2, syn, lookup, ["proc-confict-by-netsplit-custom"]) end
     ),
-    1 = syn:registry_count(default),
+    1 = syn:registry_count(),
     0 = syn:registry_count(default, node()),
     1 = syn:registry_count(default, SlaveNode1),
     0 = syn:registry_count(default, SlaveNode2),
-    1 = rpc:call(SlaveNode1, syn, registry_count, [default]),
+    1 = rpc:call(SlaveNode1, syn, registry_count, []),
     0 = rpc:call(SlaveNode1, syn, registry_count, [default, node()]),
     1 = rpc:call(SlaveNode1, syn, registry_count, [default, SlaveNode1]),
     0 = rpc:call(SlaveNode1, syn, registry_count, [default, SlaveNode2]),
-    1 = rpc:call(SlaveNode2, syn, registry_count, [default]),
+    1 = rpc:call(SlaveNode2, syn, registry_count, []),
     0 = rpc:call(SlaveNode2, syn, registry_count, [default, node()]),
     1 = rpc:call(SlaveNode2, syn, registry_count, [default, SlaveNode1]),
     0 = rpc:call(SlaveNode2, syn, registry_count, [default, SlaveNode2]),