libcloud: autopkgtest is flaky due to racy "test_retry_*" tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libcloud (Ubuntu) |
Fix Released
|
Undecided
|
Nick Rosbrook |
Bug Description
This issue has appeared recently on ppc64el autopkgtest [1]. The issue is that some of the tests from libcloud/
The following autopkgtest log snippets demonstrate this:
Take from [2]:
=======
__ ConnectionClass
self = <test.test_
mock_connect = <MagicMock name='request' id='13405639344
@patch(
def test_retry_
con = Connection()
def mock_connect_
if self.retry_counter < len(RETRY_
return 'success'
> result = retry_request(
test/test_
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/
raise last_exc
/usr/lib/
return transform_
/usr/lib/
raise exc
/usr/lib/
return function(*args, **kwargs)
/usr/lib/
return _mock_self.
/usr/lib/
return _mock_self.
/usr/lib/
result = effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (), kwargs = {'action': '/'}
def mock_connect_
if self.retry_counter < len(RETRY_
> raise RETRY_EXCEPTION
E libcloud.
test/test_
---
Taken from [3]:
=======
_______________ ConnectionClass
self = <test.test_
mock_connect = <MagicMock name='request' id='12739843913
@patch(
def test_retry_
con = Connection()
> self.assertGrea
E AssertionError: 1 not greater than 1 : Retry logic failed
test/test_
---
[1] https:/
[2] https:/
[3] https:/
Changed in libcloud (Ubuntu): | |
assignee: | nobody → Nick Rosbrook (enr0n) |
status: | New → In Progress |
tags: | added: fr-2446 |
Changed in libcloud (Ubuntu): | |
status: | In Progress → Fix Committed |
Review result:
1) Can you forward the patch upstream (and refer to upstream in the patch header)?
2) IMO it makes sense to introduce a timeout constant as global variable (for making the timeout change a one-liner).