aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2010-12-03 18:34:19 +0100
committerSverker Eriksson <[email protected]>2010-12-03 18:34:19 +0100
commit9721c1107364ab6b13bde4ae0dbb772bf7f0b154 (patch)
tree144f2ad8d4ff96490e2456ccdf6b84139fe7dce6
parentac35a3e8b4ef4fbca7699c0a3681089360780139 (diff)
downloadotp-9721c1107364ab6b13bde4ae0dbb772bf7f0b154.tar.gz
otp-9721c1107364ab6b13bde4ae0dbb772bf7f0b154.tar.bz2
otp-9721c1107364ab6b13bde4ae0dbb772bf7f0b154.zip
Fix ets_SUITE:types to not fail due to false mem leaks
Waiting for table sys_dist to stablize after slave node has been stopped.
-rw-r--r--lib/stdlib/test/ets_SUITE.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index b621b17441..620848003c 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -5688,6 +5688,7 @@ make_ext_ref() ->
Ref.
init_externals() ->
+ SysDistSz = ets:info(sys_dist,size),
?line Pa = filename:dirname(code:which(?MODULE)),
?line {ok, Node} = test_server:start_node(plopp, slave, [{args, " -pa " ++ Pa}]),
?line Res = case rpc:call(Node, ?MODULE, rpc_externals, []) of
@@ -5696,6 +5697,17 @@ init_externals() ->
R -> R
end,
?line test_server:stop_node(Node),
+
+ %% Wait for table 'sys_dist' to stabilize
+ repeat_while(fun() ->
+ case ets:info(sys_dist,size) of
+ SysDistSz -> false;
+ Sz ->
+ io:format("Waiting for sys_dist to revert size from ~p to size ~p\n",
+ [Sz, SysDistSz]),
+ receive after 1000 -> true end
+ end
+ end),
put(externals, Res).
rpc_externals() ->