Mir

Merge lp:~albaguirre/mir/fix-1643432 into lp:mir

Proposed by Alberto Aguirre on 2017-01-19
Status: Merged
Approved by: Daniel van Vugt on 2017-01-19
Approved revision: 3960
Merged at revision: 3961
Proposed branch: lp:~albaguirre/mir/fix-1643432
Merge into: lp:mir
Diff against target: 21 lines (+6/-1)
1 file modified
tests/acceptance-tests/test_nested_mir.cpp (+6/-1)
To merge this branch: bzr merge lp:~albaguirre/mir/fix-1643432
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Approve on 2017-01-19
Daniel van Vugt 2017-01-19 Approve on 2017-01-19
Review via email: mp+315089@code.launchpad.net

Commit message

tests: NestedServer: Wait to receive session_disconnect_called before
stopping the server

Make the test wait until session_disconnect_called is received before
stopping the server, avoiding a race between stopping the main loop and
the main loop dispatching the session_disconnect_called call.
(LP: #1643432)

To post a comment you must log in.
lp:~albaguirre/mir/fix-1643432 updated on 2017-01-19
3960. By Alberto Aguirre on 2017-01-19

Use mt::WakeUp

Daniel van Vugt (vanvugt) wrote :

Sure. Land it now, ask forgiveness later.

review: Approve
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3959
https://mir-jenkins.ubuntu.com/job/mir-ci/2766/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/3626/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/3701
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/3691
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/3691
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/3691
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3653
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3653/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3653
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3653/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3653
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3653/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3653
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3653/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3653
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3653/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3653/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/2766/rebuild

review: Needs Fixing (continuous-integration)
Mir CI Bot (mir-ci-bot) :
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 2017-01-18 13:59:18 +0000
3+++ tests/acceptance-tests/test_nested_mir.cpp 2017-01-19 04:36:38 +0000
4@@ -738,11 +738,16 @@
5
6 TEST_F(NestedServer, nested_platform_connects_and_disconnects)
7 {
8+ mt::Signal signal;
9 InSequence seq;
10 EXPECT_CALL(*mock_session_mediator_report, session_connect_called(_)).Times(1);
11- EXPECT_CALL(*mock_session_mediator_report, session_disconnect_called(_)).Times(1);
12+ EXPECT_CALL(*mock_session_mediator_report, session_disconnect_called(_))
13+ .Times(1)
14+ .WillOnce(mt::WakeUp(&signal));
15
16 NestedMirRunner{new_connection()};
17+
18+ EXPECT_TRUE(signal.wait_for(30s));
19 }
20
21 TEST_F(NestedServerWithTwoDisplays, sees_expected_outputs)

Subscribers

People subscribed via source and target branches