diff options
Diffstat (limited to 'lib/wx/test/wx_xtra_SUITE.erl')
-rw-r--r-- | lib/wx/test/wx_xtra_SUITE.erl | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/wx/test/wx_xtra_SUITE.erl b/lib/wx/test/wx_xtra_SUITE.erl index a2d4c26319..8d5d7ddb6a 100644 --- a/lib/wx/test/wx_xtra_SUITE.erl +++ b/lib/wx/test/wx_xtra_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009-2012. All Rights Reserved. +%% Copyright Ericsson AB 2009-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -129,15 +129,19 @@ app_dies(_Config) -> app_dies2(Test, N) -> spawn_link(fun() -> Test(N) end), - receive - {'EXIT', _, {oops, last}} -> ok; - {'EXIT', _, {oops, _}} -> app_dies2(Test, N+1) + receive + {'EXIT', _, {oops, Server, What}} -> + Ref = erlang:monitor(process, Server), + receive {'DOWN', Ref, _, _, _} -> ok end, + timer:sleep(100), + What =/= last andalso app_dies2(Test, N+1) end. oops(Die, Line) when (Die =:= last) orelse (Die =< Line) -> - timer:sleep(300), + timer:sleep(200), ?log(" Exits at line ~p~n",[Line]), - exit({oops, Die}); + Server = element(3, wx:get_env()), + exit({oops, Server, Die}); oops(_,_) -> ok. |