Browse Source

increase sync wait timer (and corresp test timeout)

Ulf Wiger 7 years ago
parent
commit
006e37d8f0
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/gproc_dist.erl
  2. 2 2
      test/gproc_dist_tests.erl

+ 1 - 1
src/gproc_dist.erl

@@ -269,7 +269,7 @@ reset_counter(_) ->
 %%
 %%
 sync() ->
 sync() ->
     %% Increase timeout since gen_leader can take some time ...
     %% Increase timeout since gen_leader can take some time ...
-    gen_server:call(?MODULE, sync, 5000).
+    gen_server:call(?MODULE, sync, 10000).
 
 
 %% @spec get_leader() -> node()
 %% @spec get_leader() -> node()
 %% @doc Returns the node of the current gproc leader.
 %% @doc Returns the node of the current gproc leader.

+ 2 - 2
test/gproc_dist_tests.erl

@@ -50,7 +50,7 @@ dist_test_() ->
                 tests(Ns, [?f(t_fail_node(Ns))])
                 tests(Ns, [?f(t_fail_node(Ns))])
         end,
         end,
         fun(Ns) ->
         fun(Ns) ->
-                tests(Ns, [{timeout, 10, ?f(t_master_dies(Ns))}])
+                tests(Ns, [{timeout, 15, ?f(t_master_dies(Ns))}])
         end
         end
        ]}
        ]}
      ]}.
      ]}.
@@ -568,7 +568,7 @@ t_sync_cand_dies([A,B,C]) ->
     ?assertMatch(ok, rpc:call(Other, sys, suspend, [gproc_dist])),
     ?assertMatch(ok, rpc:call(Other, sys, suspend, [gproc_dist])),
     P = rpc:call(Other, erlang, whereis, [gproc_dist]),
     P = rpc:call(Other, erlang, whereis, [gproc_dist]),
     Key = rpc:async_call(Leader, gproc_dist, sync, []),
     Key = rpc:async_call(Leader, gproc_dist, sync, []),
-    %% The overall timeout for gproc_dist:sync() is 5 seconds. Here, we should
+    %% The overall timeout for gproc_dist:sync() is 10 seconds. Here, we should
     %% still be waiting.
     %% still be waiting.
     ?assertMatch(timeout, rpc:nb_yield(Key, 1000)),
     ?assertMatch(timeout, rpc:nb_yield(Key, 1000)),
     exit(P, kill),
     exit(P, kill),