Build and test on OTP 22
This commit is contained in:
parent
681f243e87
commit
009abdd599
3 changed files with 37 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
{erl_opts, [warnings_as_errors,
|
{erl_opts, [warnings_as_errors,
|
||||||
{platform_define, "^2[0-1]{1}", fsm_deprecated},
|
{platform_define, "^2[0-3]{1}", fsm_deprecated},
|
||||||
{platform_define, "^1[7-8]{1}", old_rand},
|
{platform_define, "^1[7-8]{1}", old_rand},
|
||||||
{platform_define, "^17", no_log2},
|
{platform_define, "^17", no_log2},
|
||||||
{platform_define, "^R", no_sync},
|
{platform_define, "^R", no_sync},
|
||||||
|
|
|
@ -1553,9 +1553,25 @@ handle_down_test() ->
|
||||||
SnapOpts = #inker_options{start_snapshot=true,
|
SnapOpts = #inker_options{start_snapshot=true,
|
||||||
bookies_pid = FakeBookie,
|
bookies_pid = FakeBookie,
|
||||||
source_inker=Ink1},
|
source_inker=Ink1},
|
||||||
|
|
||||||
{ok, Snap1} = ink_snapstart(SnapOpts),
|
{ok, Snap1} = ink_snapstart(SnapOpts),
|
||||||
|
|
||||||
|
CheckSnapDiesFun =
|
||||||
|
fun(_X, IsDead) ->
|
||||||
|
case IsDead of
|
||||||
|
true ->
|
||||||
|
true;
|
||||||
|
false ->
|
||||||
|
case erlang:process_info(Snap1) of
|
||||||
|
undefined ->
|
||||||
|
true;
|
||||||
|
_ ->
|
||||||
|
timer:sleep(100),
|
||||||
|
false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
?assertNot(lists:foldl(CheckSnapDiesFun, false, [1, 2])),
|
||||||
|
|
||||||
FakeBookie ! stop,
|
FakeBookie ! stop,
|
||||||
|
|
||||||
receive
|
receive
|
||||||
|
@ -1565,7 +1581,7 @@ handle_down_test() ->
|
||||||
ok
|
ok
|
||||||
end,
|
end,
|
||||||
|
|
||||||
?assertEqual(undefined, erlang:process_info(Snap1)),
|
?assert(lists:foldl(CheckSnapDiesFun, false, lists:seq(1, 10))),
|
||||||
|
|
||||||
ink_close(Ink1),
|
ink_close(Ink1),
|
||||||
clean_testdir(RootPath).
|
clean_testdir(RootPath).
|
||||||
|
|
|
@ -2388,6 +2388,23 @@ handle_down_test() ->
|
||||||
{ok, Snap, null}
|
{ok, Snap, null}
|
||||||
end,
|
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,
|
FakeBookie ! stop,
|
||||||
|
|
||||||
receive
|
receive
|
||||||
|
@ -2397,7 +2414,7 @@ handle_down_test() ->
|
||||||
ok
|
ok
|
||||||
end,
|
end,
|
||||||
|
|
||||||
?assertEqual(undefined, erlang:process_info(PclSnap)),
|
?assert(lists:foldl(CheckSnapDiesFun, false, lists:seq(1, 10))),
|
||||||
|
|
||||||
pcl_close(PCLr),
|
pcl_close(PCLr),
|
||||||
clean_testdir(RootPath).
|
clean_testdir(RootPath).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue