Reset the socket default timeout in test setup harness

Bug #140818 reported by Christian Reis
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Francis J. Lacoste

Bug Description

We currently had PQM reject 3 days of submissions because a single test set the socket default timeout to 1 (and not resetting it to its original value). The reason this causes the tests to fail is because the Librarian daemon does a lot of connecting and querying, and with a client timeout of 1s it's simply not enough time for the Librarian to respond.

The test was doc/bugtracker.txt, and it issued socket.setdefaulttimeout(1)

That the librarian daemon takes too much time reconnecting is bug #140817. But the test suite should kick back the socket timeout to the default value.

Christian Reis (kiko)
Changed in launchpad:
assignee: nobody → flacoste
importance: Undecided → High
Revision history for this message
Francis J. Lacoste (flacoste) wrote :

I don't think we need to add special support for reverting possible changes to that global.

Today, there are only two tests in RF that call setdefaulttimeout(): one in bzrlib and another is a unit test. This means that this new support wouldn't even be useful for these two tests. (bzrlib tests use their own infrastructure and unit tests don't use the layers system).

Changed in launchpad:
status: New → Incomplete
Revision history for this message
Christian Reis (kiko) wrote : Re: [Bug 140818] Re: Reset the socket default timeout in test setup harness

I proposed it to avoid the problem reoccuring, given the severity of the
outage and stress that ensued because of the modified value. I don't
care so much as long as it never happens again.

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

I think I'll simply add an assertion in BaseLayer.testTearDown() that asserts
that the default timeout (None) is in effect. That way we will get a
complaint if a test forget to clean-up after itself.

Revision history for this message
Christian Reis (kiko) wrote :

That idea is much better than mine.

Changed in launchpad:
status: Incomplete → Triaged
Revision history for this message
Francis J. Lacoste (flacoste) wrote :

Fixed in RF 4969.

Changed in launchpad:
status: Triaged → Fix Committed
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.