WIP: compiler warning fixups
This commit is contained in:
parent
4f7177067e
commit
4334c71a4d
2 changed files with 8 additions and 6 deletions
|
@ -161,11 +161,11 @@ convergence_demo_testfun(NumFLUs) ->
|
||||||
PsDirs = lists:zip(Ps,
|
PsDirs = lists:zip(Ps,
|
||||||
[Dir || {_,_,Dir} <- lists:sublist(FluInfo, NumFLUs)]),
|
[Dir || {_,_,Dir} <- lists:sublist(FluInfo, NumFLUs)]),
|
||||||
FLU_pids = [machi_flu1_test:setup_test_flu(Name, Port, Dir) ||
|
FLU_pids = [machi_flu1_test:setup_test_flu(Name, Port, Dir) ||
|
||||||
{#p_srvr{name=Name,port=Port}=P, Dir} <- PsDirs],
|
{#p_srvr{name=Name,port=Port}, Dir} <- PsDirs],
|
||||||
Namez = [begin
|
Namez = [begin
|
||||||
{ok, PPid} = ?FLU_PC:start_link(P),
|
{ok, PPid} = ?FLU_PC:start_link(P),
|
||||||
{Name, PPid}
|
{Name, PPid}
|
||||||
end || {#p_srvr{name=Name,port=Port}=P, Dir} <- PsDirs],
|
end || {#p_srvr{name=Name}=P, _Dir} <- PsDirs],
|
||||||
MembersDict = machi_projection:make_members_dict(Ps),
|
MembersDict = machi_projection:make_members_dict(Ps),
|
||||||
MgrOpts = [private_write_verbose, {active_mode,false}],
|
MgrOpts = [private_write_verbose, {active_mode,false}],
|
||||||
MgrNamez =
|
MgrNamez =
|
||||||
|
@ -247,7 +247,7 @@ convergence_demo_testfun(NumFLUs) ->
|
||||||
machi_partition_simulator:always_these_partitions(Partition),
|
machi_partition_simulator:always_these_partitions(Partition),
|
||||||
io:format(user, "\nSET partitions = ~w.\n", [Partition]),
|
io:format(user, "\nSET partitions = ~w.\n", [Partition]),
|
||||||
[DoIt(50, 10, 100) || _ <- [1,2,3,4] ],
|
[DoIt(50, 10, 100) || _ <- [1,2,3,4] ],
|
||||||
PPP =
|
_PPP =
|
||||||
[begin
|
[begin
|
||||||
{ok, PPPallPubs} = ?FLU_PC:list_all_projections(FLU,public),
|
{ok, PPPallPubs} = ?FLU_PC:list_all_projections(FLU,public),
|
||||||
[begin
|
[begin
|
||||||
|
@ -256,7 +256,7 @@ convergence_demo_testfun(NumFLUs) ->
|
||||||
{Pr#projection_v1.epoch_number, FLUName, Pr}
|
{Pr#projection_v1.epoch_number, FLUName, Pr}
|
||||||
end || PPPepoch <- PPPallPubs]
|
end || PPPepoch <- PPPallPubs]
|
||||||
end || {FLUName, FLU} <- Namez],
|
end || {FLUName, FLU} <- Namez],
|
||||||
%% io:format(user, "PPP ~p\n", [lists:sort(lists:append(PPP))]),
|
%% io:format(user, "PPP ~p\n", [lists:sort(lists:append(_PPP))]),
|
||||||
|
|
||||||
%%%%%%%% {stable,true} = {stable,private_projections_are_stable(Namez, DoIt)},
|
%%%%%%%% {stable,true} = {stable,private_projections_are_stable(Namez, DoIt)},
|
||||||
{hosed_ok,true} = {hosed_ok,all_hosed_lists_are_identical(Namez, Partition)},
|
{hosed_ok,true} = {hosed_ok,all_hosed_lists_are_identical(Namez, Partition)},
|
||||||
|
@ -337,8 +337,8 @@ convergence_demo_testfun(NumFLUs) ->
|
||||||
%% For each chain transition experienced by a particular FLU,
|
%% For each chain transition experienced by a particular FLU,
|
||||||
%% confirm that each state transition is OK.
|
%% confirm that each state transition is OK.
|
||||||
try
|
try
|
||||||
[{FLU, true} = {FLU, ?MGR:projection_transitions_are_sane(Ps, FLU)} ||
|
[{FLU, true} = {FLU, ?MGR:projection_transitions_are_sane(Psx, FLU)} ||
|
||||||
{FLU, Ps} <- R_Projs],
|
{FLU, Psx} <- R_Projs],
|
||||||
io:format(user, "\nAll sanity checks pass, hooray!\n", [])
|
io:format(user, "\nAll sanity checks pass, hooray!\n", [])
|
||||||
catch _Err:_What ->
|
catch _Err:_What ->
|
||||||
io:format(user, "Report ~p\n", [Report]),
|
io:format(user, "Report ~p\n", [Report]),
|
||||||
|
|
|
@ -198,6 +198,7 @@ partitions2num_islands(Members0, Partition0) ->
|
||||||
%% Ignore duplicates in either arg, if any.
|
%% Ignore duplicates in either arg, if any.
|
||||||
Members = lists:usort(Members0),
|
Members = lists:usort(Members0),
|
||||||
Partition = lists:usort(Partition0),
|
Partition = lists:usort(Partition0),
|
||||||
|
io:format(user, "\npartitions2num_islands(Members, Partition)\n~p ~p\n", [Members, Partition]),
|
||||||
|
|
||||||
Connections = partition2connection(Members, Partition),
|
Connections = partition2connection(Members, Partition),
|
||||||
Cs = [lists:member({X,Y}, Connections)
|
Cs = [lists:member({X,Y}, Connections)
|
||||||
|
@ -206,6 +207,7 @@ partitions2num_islands(Members0, Partition0) ->
|
||||||
X /= Y],
|
X /= Y],
|
||||||
case lists:usort(Cs) of
|
case lists:usort(Cs) of
|
||||||
[true] -> 1;
|
[true] -> 1;
|
||||||
|
[false] -> many;
|
||||||
[false, true] -> many % TODO too lazy to finish
|
[false, true] -> many % TODO too lazy to finish
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue