Merge pull request #305 from martinsumner/mas-i304-otp22

Mas i304 otp22
This commit is contained in:
Martin Sumner 2020-02-24 12:49:25 +00:00 committed by GitHub
commit 5b11462054
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 4 deletions

View file

@ -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-2]{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},

View file

@ -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).

View file

@ -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).