Mir

Merge lp:~vanvugt/mir/fix-1252144.trunk into lp:mir/0.1

Proposed by Daniel van Vugt
Status: Merged
Merged at revision: 1164
Proposed branch: lp:~vanvugt/mir/fix-1252144.trunk
Merge into: lp:mir/0.1
Diff against target: 30 lines (+4/-2)
1 file modified
tests/unit-tests/frontend/test_published_socket_connector.cpp (+4/-2)
To merge this branch: bzr merge lp:~vanvugt/mir/fix-1252144.trunk
Reviewer Review Type Date Requested Status
Timo Jyrinki (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Daniel van Vugt Abstain
Mir development team Pending
Review via email: mp+195547@code.launchpad.net

Commit message

Bump timeouts used in socket testing. It seems 100ms isn't always enough,
which leads to spurious test failures (LP: #1252144)

Description of the change

Proposing this to lp:mir first, because that's where it's immediately required. And I can't reproduce the bug to verify the fix works yet anyway. So we need Jenkins to try it on lp:mir for verification.

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Actually this is probably way off the mark. The failing test only takes 1ms to fail.

review: Disapprove
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Traced through the failing logic and now I can't see any other logical explanation than a timeout. Which also means the test log claiming it only took 1ms is either inaccurate or the timing on the host is broken.

review: Abstain
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK, if I modify the code to force a timeout then it indeed does fail like in bug 1252144.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It appears to just be the build machines timing out, and no build or test failures :(

Revision history for this message
Timo Jyrinki (timo-jyrinki) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Reported the problems to CI team, meanwhile just trying again

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Merged manually as CI still not working.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/unit-tests/frontend/test_published_socket_connector.cpp'
2--- tests/unit-tests/frontend/test_published_socket_connector.cpp 2013-11-06 03:17:35 +0000
3+++ tests/unit-tests/frontend/test_published_socket_connector.cpp 2013-11-18 06:14:49 +0000
4@@ -46,6 +46,8 @@
5
6 namespace
7 {
8+const int timeout_ms = 60 * 1000;
9+
10 class MockConnectorReport : public mf::ConnectorReport
11 {
12 public:
13@@ -96,7 +98,7 @@
14 communicator_report);
15
16 stub_server->comm->start();
17- client = std::make_shared<mt::TestProtobufClient>(test_socket, 100);
18+ client = std::make_shared<mt::TestProtobufClient>(test_socket, timeout_ms);
19 client->connect_parameters.set_application_name(__PRETTY_FUNCTION__);
20 }
21
22@@ -425,7 +427,7 @@
23 int const next_buffer_calls{8};
24 char buffer[128] = {0};
25 sprintf(buffer, "fd://%d", stub_server->comm->client_socket_fd());
26- auto client = std::make_shared<mt::TestProtobufClient>(buffer, 100);
27+ auto client = std::make_shared<mt::TestProtobufClient>(buffer, timeout_ms);
28 client->connect_parameters.set_application_name(__PRETTY_FUNCTION__);
29
30 EXPECT_CALL(*client, connect_done()).Times(1);

Subscribers

People subscribed via source and target branches