Mir

Merge lp:~alan-griffiths/mir/fix-1522356 into lp:mir

Proposed by Alan Griffiths
Status: Merged
Approved by: Alberto Aguirre
Approved revision: no longer in the source branch.
Merged at revision: 3174
Proposed branch: lp:~alan-griffiths/mir/fix-1522356
Merge into: lp:mir
Diff against target: 36 lines (+6/-3)
1 file modified
tests/acceptance-tests/test_system_compositor_window_manager.cpp (+6/-3)
To merge this branch: bzr merge lp:~alan-griffiths/mir/fix-1522356
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Kevin DuBois (community) Approve
Alexandros Frantzis (community) Approve
Review via email: mp+279425@code.launchpad.net

Commit message

tests: don't set expectations on "surface_event" while it may be called on another thread

Description of the change

tests: don't set expectations on "surface_event" while it may be called on another thread

To post a comment you must log in.
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Looks good.

review: Approve
Revision history for this message
Kevin DuBois (kdub) wrote :

ok

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Failure is lp:1522105

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/acceptance-tests/test_system_compositor_window_manager.cpp'
2--- tests/acceptance-tests/test_system_compositor_window_manager.cpp 2015-11-10 09:03:33 +0000
3+++ tests/acceptance-tests/test_system_compositor_window_manager.cpp 2015-12-03 11:58:33 +0000
4@@ -177,13 +177,12 @@
5 // Throw away all uninteresting surface events
6 EXPECT_CALL(client, surface_event(_, Not(MirFocusEvent(mir_surface_focused)))).Times(AnyNumber());
7
8- auto surface = client.create_surface(1);
9-
10 mt::Signal signal;
11
12 EXPECT_CALL(client, surface_event(_, MirFocusEvent(mir_surface_focused))).Times(1)
13 .WillOnce(InvokeWithoutArgs([&] { signal.raise(); }));
14
15+ auto surface = client.create_surface(1);
16 surface.post_buffer();
17
18 signal.wait_for(1s);
19@@ -192,12 +191,16 @@
20 TEST_F(SystemCompositorWindowManager, if_no_surface_posts_client_never_gets_focus)
21 {
22 auto client = connect_client();
23- auto surface = client.create_surface(1);
24+
25+ // Throw away all uninteresting surface events
26+ EXPECT_CALL(client, surface_event(_, Not(MirFocusEvent(mir_surface_focused)))).Times(AnyNumber());
27
28 mt::Signal signal;
29
30 ON_CALL(client, surface_event(_, MirFocusEvent(mir_surface_focused)))
31 .WillByDefault(InvokeWithoutArgs([&] { signal.raise(); }));
32
33+ auto surface = client.create_surface(1);
34+
35 EXPECT_FALSE(signal.wait_for(100ms)) << "Unexpected surface_focused event received";
36 }

Subscribers

People subscribed via source and target branches