Browse Source

t_sync_cand_dies() must consider all three nodes. Increased timeout

Ulf Wiger 7 years ago
parent
commit
a31e00dfa8
1 changed files with 4 additions and 3 deletions
  1. 4 3
      test/gproc_dist_tests.erl

+ 4 - 3
test/gproc_dist_tests.erl

@@ -25,7 +25,7 @@
 -define(f(E), fun() -> ?debugVal(E) end).
 -define(f(E), fun() -> ?debugVal(E) end).
 
 
 dist_test_() ->
 dist_test_() ->
-    {timeout, 120,
+    {timeout, 180,
      [
      [
       %% {setup,
       %% {setup,
       %%  fun dist_setup/0,
       %%  fun dist_setup/0,
@@ -557,11 +557,12 @@ t_subscribe([A,B|_] = Ns) ->
 %% Verify that the gproc_dist:sync() call returns true even if a candidate dies
 %% Verify that the gproc_dist:sync() call returns true even if a candidate dies
 %% while the sync is underway. This test makes use of sys:suspend() to ensure that
 %% while the sync is underway. This test makes use of sys:suspend() to ensure that
 %% the other candidate doesn't respond too quickly.
 %% the other candidate doesn't respond too quickly.
-t_sync_cand_dies([A,B|_]) ->
+t_sync_cand_dies([A,B,C]) ->
     Leader = rpc:call(A, gproc_dist, get_leader, []),
     Leader = rpc:call(A, gproc_dist, get_leader, []),
     Other = case Leader of
     Other = case Leader of
 		A -> B;
 		A -> B;
-		B -> A
+		B -> A;
+                C -> A
 	    end,
 	    end,
     ?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]),