Mir

Merge lp:~afrantzis/mir/fix-1353465 into lp:mir

Proposed by Alexandros Frantzis
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 1841
Proposed branch: lp:~afrantzis/mir/fix-1353465
Merge into: lp:mir
Diff against target: 32 lines (+7/-1)
1 file modified
tests/acceptance-tests/test_nested_mir.cpp (+7/-1)
To merge this branch: bzr merge lp:~afrantzis/mir/fix-1353465
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Daniel van Vugt Approve
Kevin DuBois (community) Approve
Cemil Azizoglu (community) Approve
Review via email: mp+230654@code.launchpad.net

Commit message

tests: Ensure we process lifecycle events before the nested server is torn down. (LP: #1353465)

To post a comment you must log in.
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

Interesting. LGTM.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Kevin DuBois (kdub) wrote :

lgtm

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote :

Trying again, failure was due to having to remove mir-mediumtests-runner-mako which can't run right now due to installation of adbd.

Revision history for this message
Daniel van Vugt (vanvugt) :
review: Approve
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_nested_mir.cpp'
2--- tests/acceptance-tests/test_nested_mir.cpp 2014-08-06 15:15:35 +0000
3+++ tests/acceptance-tests/test_nested_mir.cpp 2014-08-13 15:18:02 +0000
4@@ -28,6 +28,7 @@
5
6 #include "mir_test_framework/in_process_server.h"
7 #include "mir_test_framework/stubbed_server_configuration.h"
8+#include "mir_test/wait_condition.h"
9
10 #include "mir_test_doubles/mock_egl.h"
11
12@@ -384,14 +385,19 @@
13
14 NestedMirRunner nested_mir{nested_config};
15
16+ mir::test::WaitCondition events_processed;
17+
18 InSequence seq;
19 EXPECT_CALL(*(nested_config.the_mock_host_lifecycle_event_listener()),
20 lifecycle_event_occurred(mir_lifecycle_state_resumed)).Times(1);
21 EXPECT_CALL(*(nested_config.the_mock_host_lifecycle_event_listener()),
22- lifecycle_event_occurred(mir_lifecycle_state_will_suspend)).Times(1);
23+ lifecycle_event_occurred(mir_lifecycle_state_will_suspend))
24+ .WillOnce(WakeUp(&events_processed));
25 EXPECT_CALL(*(nested_config.the_mock_host_lifecycle_event_listener()),
26 lifecycle_event_occurred(mir_lifecycle_connection_lost)).Times(AtMost(1));
27
28 trigger_lifecycle_event(mir_lifecycle_state_resumed);
29 trigger_lifecycle_event(mir_lifecycle_state_will_suspend);
30+
31+ events_processed.wait_for_at_most_seconds(5);
32 }

Subscribers

People subscribed via source and target branches