aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2014-04-17 14:52:55 +0200
committerDan Gudmundsson <[email protected]>2014-04-17 14:52:55 +0200
commit8093b972025dfd4f390266fa5288ebb46a516317 (patch)
tree03bac2a4dc6abfec1c4b77a2ff35c9219800f1cd
parent2fb83e99c6db6fa9537222b20af5f678c75dd584 (diff)
downloadotp-8093b972025dfd4f390266fa5288ebb46a516317.tar.gz
otp-8093b972025dfd4f390266fa5288ebb46a516317.tar.bz2
otp-8093b972025dfd4f390266fa5288ebb46a516317.zip
observer: Destroy the wx env
Ensure that the server exists on close, even though linked to the test process
-rw-r--r--lib/observer/src/observer_wx.erl1
-rw-r--r--lib/observer/test/observer_SUITE.erl5
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/observer/src/observer_wx.erl b/lib/observer/src/observer_wx.erl
index ced26f7119..768dc3b3f7 100644
--- a/lib/observer/src/observer_wx.erl
+++ b/lib/observer/src/observer_wx.erl
@@ -388,6 +388,7 @@ handle_info(_Info, State) ->
terminate(_Reason, #state{frame = Frame}) ->
wxFrame:destroy(Frame),
+ wx:destroy(),
ok.
code_change(_, _, State) ->
diff --git a/lib/observer/test/observer_SUITE.erl b/lib/observer/test/observer_SUITE.erl
index b91182feee..5cf719acb1 100644
--- a/lib/observer/test/observer_SUITE.erl
+++ b/lib/observer/test/observer_SUITE.erl
@@ -107,6 +107,7 @@ appup_file(Config) when is_list(Config) ->
basic(suite) -> [];
basic(doc) -> [""];
basic(Config) when is_list(Config) ->
+ timer:send_after(100, "foobar"), %% Otherwise the timer sever gets added to procs
ProcsBefore = processes(),
NumProcsBefore = length(ProcsBefore),
@@ -243,14 +244,12 @@ table_win(Config) when is_list(Config) ->
%% Modal can not test edit..
%% TPid = wx_object:get_pid(TObj),
%% TPid ! #wx{event=#wxList{type=command_list_item_activated, itemIndex=12}},
- timer:sleep(2000),
+ timer:sleep(3000),
wx_object:get_pid(TObj) ! #wx{event=#wxClose{type=close_window}},
observer:stop(),
ok.
-
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
get_top_level_parent(Window) ->