Build and test on OTP 22

This commit is contained in:
Martin Sumner 2020-02-24 09:55:05 +00:00
parent 681f243e87
commit 009abdd599
3 changed files with 37 additions and 4 deletions

View file

@ -2387,6 +2387,23 @@ handle_down_test() ->
{FakeBookie, {ok, Snap, null}} ->
{ok, Snap, null}
end,
CheckSnapDiesFun =
fun(_X, IsDead) ->
case IsDead of
true ->
true;
false ->
case erlang:process_info(PclSnap) of
undefined ->
true;
_ ->
timer:sleep(100),
false
end
end
end,
?assertNot(lists:foldl(CheckSnapDiesFun, false, [1, 2])),
FakeBookie ! stop,
@ -2397,7 +2414,7 @@ handle_down_test() ->
ok
end,
?assertEqual(undefined, erlang:process_info(PclSnap)),
?assert(lists:foldl(CheckSnapDiesFun, false, lists:seq(1, 10))),
pcl_close(PCLr),
clean_testdir(RootPath).