~cjwatson/mir/arm64-no-valgrind

« back to all changes in this revision

Viewing changes to tests/unit-tests/frontend/test_published_socket_connector.cpp

  • Committer: Tarmac
  • Author(s): Alan Griffiths, Daniel van Vugt, Kevin Gunn, Daniel d'Andrada, Kevin DuBois, Robert Ancell, Alexandros Frantzis
  • Date: 2013-10-03 03:48:54 UTC
  • mfrom: (1081.3.23 development-branch)
  • Revision ID: tarmac-20131003034854-xt39hgpdwywgkdox
* bump deb changelog to 0.0.13 and libmirserver5.
lp:~kgunn72/mir/bump-libmirserver5-take2

* graphics: android: disable vsync notifications when screen is off as per hwc specs. rename unblank_or_blank_display to apply_display_state() to remove ambiguity about what is being done.
fixes: lp1233870. Fixes: https://bugs.launchpad.net/bugs/1233870.
branch lp:~kdub/mir/deactive-notifications-when-display-off

* Simplify {Default,Basic}DisplayBufferCompositor classes into one.
branch lp:~vanvugt/mir/simplify-DisplayBufferCompositors

* Make cross-compile-chroot.sh build in parallel when suitable
branch lp:~dandrader/mir/cross-compile-parallel

* Fix race in connection failures. Fixes: https://bugs.launchpad.net/bugs/1201436.
branch lp:~alan-griffiths/mir/fix-1201436
Bug #1201436: Intermittent hang in ClientPidTestFixture.authorizer_may_prevent_connection_of_clients test

* Privatize surface_data.h; not required in any public APIs.
Fixes: https://bugs.launchpad.net/bugs/1223393.
branch lp:~vanvugt/mir/privatize-SurfaceData

* client: Clean up client side error handling and suicide if connection fails
branch lp:~alan-griffiths/mir/client-dies-without-server

* frontend, logging: Provide reporting from frontend::Connector.
branch lp:~alan-griffiths/mir/frontend-ConnectorReport-enablement

* Properly track buffers per-surface (not per session). Failure to do so was
causing premature buffer release and re-use in cases with multiple surfaces
per client/session. In XMir this was seen as out of order, glitchy and slow
frames when using multiple monitors (LP: #1216472). Fixes: https://bugs.launchpad.net/bugs/1216472.
branch lp:~afrantzis/mir/fix-out-of-order-buffers-1216472.

Approved by PS Jenkins bot, Robert Ancell.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
namespace
48
48
{
49
 
class MockCommunicatorReport : public mf::ConnectorReport
 
49
class MockConnectorReport : public mf::ConnectorReport
50
50
{
51
51
public:
52
52
 
53
 
    ~MockCommunicatorReport() noexcept {}
 
53
    ~MockConnectorReport() noexcept {}
 
54
 
 
55
    MOCK_METHOD0(thread_start, void ());
 
56
    MOCK_METHOD0(thread_end, void());
 
57
    MOCK_METHOD1(starting_threads, void (int count));
 
58
    MOCK_METHOD1(stopping_threads, void(int count));
 
59
 
 
60
    MOCK_METHOD1(creating_session_for, void(int socket_handle));
 
61
    MOCK_METHOD2(creating_socket_pair, void(int server_handle, int client_handle));
 
62
 
 
63
    MOCK_METHOD1(listening_on, void(std::string const& endpoint));
54
64
 
55
65
    MOCK_METHOD1(error, void (std::exception const& error));
56
66
};
64
74
 
65
75
    void SetUp()
66
76
    {
67
 
        communicator_report = std::make_shared<MockCommunicatorReport>();
 
77
        communicator_report = std::make_shared<MockConnectorReport>();
68
78
        stub_server_tool = std::make_shared<mt::StubServerTool>();
69
79
        stub_server = std::make_shared<mt::TestProtobufServer>(
70
80
            "./test_socket",
94
104
    }
95
105
 
96
106
    std::shared_ptr<mt::TestProtobufClient> client;
97
 
    static std::shared_ptr<MockCommunicatorReport> communicator_report;
 
107
    static std::shared_ptr<MockConnectorReport> communicator_report;
98
108
    static std::shared_ptr<mt::StubServerTool> stub_server_tool;
99
109
    static std::shared_ptr<mt::TestProtobufServer> stub_server;
100
110
};
101
111
 
102
112
std::shared_ptr<mt::StubServerTool> PublishedSocketConnector::stub_server_tool;
103
 
std::shared_ptr<MockCommunicatorReport> PublishedSocketConnector::communicator_report;
 
113
std::shared_ptr<MockConnectorReport> PublishedSocketConnector::communicator_report;
104
114
std::shared_ptr<mt::TestProtobufServer> PublishedSocketConnector::stub_server;
105
115
 
106
116
TEST_F(PublishedSocketConnector, create_surface_results_in_a_callback)