aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2014-03-03 11:59:16 +0100
committerDan Gudmundsson <[email protected]>2014-03-28 09:55:56 +0100
commit4f22b3eec2d69eb2cdcacb79fd5d71f3c5c80afa (patch)
treeeea2735c7ed6adae26c8ab9e722b9313a26a089a
parent5b9ffc724e7c3ffe7c775b5113de059e2e25f755 (diff)
downloadotp-4f22b3eec2d69eb2cdcacb79fd5d71f3c5c80afa.tar.gz
otp-4f22b3eec2d69eb2cdcacb79fd5d71f3c5c80afa.tar.bz2
otp-4f22b3eec2d69eb2cdcacb79fd5d71f3c5c80afa.zip
wx: loosen testcase
-rw-r--r--lib/wx/test/wx_basic_SUITE.erl13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/wx/test/wx_basic_SUITE.erl b/lib/wx/test/wx_basic_SUITE.erl
index 7bdbd4594c..e3bbb21a23 100644
--- a/lib/wx/test/wx_basic_SUITE.erl
+++ b/lib/wx/test/wx_basic_SUITE.erl
@@ -341,23 +341,22 @@ wx_object(Config) ->
Me = self(),
?m({call, foobar, {Me, _}}, wx_object:call(Frame, foobar)),
?m(ok, wx_object:cast(Frame, foobar2)),
- ?m([{cast, foobar2}], flush()),
+ ?m([{cast, foobar2}|_], flush()),
FramePid = wx_object:get_pid(Frame),
io:format("wx_object pid ~p~n",[FramePid]),
FramePid ! foo3,
- ?m([{info, foo3}], flush()),
+ ?m([{info, foo3}|_], flush()),
?m(ok, wx_object:cast(Frame, fun(_) -> hehe end)),
- ?m([{cast, hehe}], flush()),
+ ?m([{cast, hehe}|_], flush()),
wxWindow:refresh(Frame),
- ?m([{sync_event, #wx{event=#wxPaint{}}, _}], flush()),
+ ?m([{sync_event, #wx{event=#wxPaint{}}, _}|_], flush()),
?m(ok, wx_object:cast(Frame, fun(_) -> timer:sleep(200), slept end)),
%% The sleep above should not hinder the Paint event below
%% Which it did in my buggy handling of the sync_callback
wxWindow:refresh(Frame),
- ?m([{sync_event, #wx{event=#wxPaint{}}, _}], flush()),
timer:sleep(500),
- ?m([{cast, slept}], flush()),
+ ?m([{sync_event, #wx{event=#wxPaint{}}, _}, {cast, slept}|_], flush()),
Monitor = erlang:monitor(process, FramePid),
case proplists:get_value(user, Config, false) of
@@ -397,7 +396,7 @@ check_events([], Async, Sync) ->
end.
flush() ->
- flush([], 500).
+ flush([], 1500).
flush(Acc, Wait) ->
receive