Intermitent failures in unit tests

Bug #1466376 reported by Thomas Goirand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Invalid
Undecided
Unassigned

Bug Description

Building the python-cinderclient in Debian (we're uploading Liberty in Debian Experimental for the moment), I had twice failures in unit tests, but all the other times I ran the build of the package, the unit tests all passed. The below was run using Python 3.5 (the unit tests are run against Python 2.7, 3.4 and 3.5), but I have no clue if this is Python 3.5 specific. So there must be some kind of race condition triggering the failure. I don't know more, but I'd be happy to investigate with some help.

======================================================================
FAIL: cinderclient.tests.unit.v1.test_auth.AuthenticateAgainstKeystoneTests.test_authenticate_tenant_id
cinderclient.tests.unit.v1.test_auth.AuthenticateAgainstKeystoneTests.test_authenticate_tenant_id
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-cinderclient/build-area/python-cinderclient-1.2.2/cinderclient/tests/unit/v1/test_auth.py", line 164, in test_authenticate_tenant_id
    test_auth_call()
  File "/usr/lib/python3/dist-packages/mock.py", line 1210, in patched
    return func(*args, **keywargs)
  File "/home/zigo/sources/openstack/liberty/python-cinderclient/build-area/python-cinderclient-1.2.2/cinderclient/tests/unit/v1/test_auth.py", line 154, in test_auth_call
    **self.TEST_REQUEST_BASE)
  File "/usr/lib/python3/dist-packages/mock.py", line 844, in assert_called_with
    raise AssertionError(msg)
AssertionError: Expected call: mock('POST', 'http://localhost:8776/v1/v2.0/tokens', allow_redirects=True, data='{"auth": {"tenantId": "tenant_id", "passwordCredentials": {"password": "password", "username": "username"}}}', verify=True, headers={'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'python-cinderclient'})
Actual call: mock('POST', 'http://localhost:8776/v1/v2.0/tokens', allow_redirects=True, data='{"auth": {"passwordCredentials": {"password": "password", "username": "username"}, "tenantId": "tenant_id"}}', verify=True, headers={'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'python-cinderclient'})
Traceback (most recent call last):
testtools.testresult.real._StringException: Empty attachments:
  stderr
  stdout

Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-cinderclient/build-area/python-cinderclient-1.2.2/cinderclient/tests/unit/v1/test_auth.py", line 164, in test_authenticate_tenant_id
    test_auth_call()
  File "/usr/lib/python3/dist-packages/mock.py", line 1210, in patched
    return func(*args, **keywargs)
  File "/home/zigo/sources/openstack/liberty/python-cinderclient/build-area/python-cinderclient-1.2.2/cinderclient/tests/unit/v1/test_auth.py", line 154, in test_auth_call
    **self.TEST_REQUEST_BASE)
  File "/usr/lib/python3/dist-packages/mock.py", line 844, in assert_called_with
    raise AssertionError(msg)
AssertionError: Expected call: mock('POST', 'http://localhost:8776/v1/v2.0/tokens', allow_redirects=True, data='{"auth": {"tenantId": "tenant_id", "passwordCredentials": {"password": "password", "username": "username"}}}', verify=True, headers={'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'python-cinderclient'})
Actual call: mock('POST', 'http://localhost:8776/v1/v2.0/tokens', allow_redirects=True, data='{"auth": {"passwordCredentials": {"password": "password", "username": "username"}, "tenantId": "tenant_id"}}', verify=True, headers={'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'python-cinderclient'})

Traceback (most recent call last):
testtools.testresult.real._StringException: Empty attachments:
  stderr
  stdout

Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-cinderclient/build-area/python-cinderclient-1.2.2/cinderclient/tests/unit/v1/test_auth.py", line 164, in test_authenticate_tenant_id
    test_auth_call()
  File "/usr/lib/python3/dist-packages/mock.py", line 1210, in patched
    return func(*args, **keywargs)
  File "/home/zigo/sources/openstack/liberty/python-cinderclient/build-area/python-cinderclient-1.2.2/cinderclient/tests/unit/v1/test_auth.py", line 154, in test_auth_call
    **self.TEST_REQUEST_BASE)
  File "/usr/lib/python3/dist-packages/mock.py", line 844, in assert_called_with
    raise AssertionError(msg)
AssertionError: Expected call: mock('POST', 'http://localhost:8776/v1/v2.0/tokens', allow_redirects=True, data='{"auth": {"tenantId": "tenant_id", "passwordCredentials": {"password": "password", "username": "username"}}}', verify=True, headers={'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'python-cinderclient'})
Actual call: mock('POST', 'http://localhost:8776/v1/v2.0/tokens', allow_redirects=True, data='{"auth": {"passwordCredentials": {"password": "password", "username": "username"}, "tenantId": "tenant_id"}}', verify=True, headers={'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'python-cinderclient'})

======================================================================
FAIL: cinderclient.tests.unit.v2.test_auth.AuthenticateAgainstKeystoneTests.test_authenticate_tenant_id
cinderclient.tests.unit.v2.test_auth.AuthenticateAgainstKeystoneTests.test_authenticate_tenant_id
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-cinderclient/build-area/python-cinderclient-1.2.2/cinderclient/tests/unit/v2/test_auth.py", line 167, in test_authenticate_tenant_id
    test_auth_call()
  File "/usr/lib/python3/dist-packages/mock.py", line 1210, in patched
    return func(*args, **keywargs)
  File "/home/zigo/sources/openstack/liberty/python-cinderclient/build-area/python-cinderclient-1.2.2/cinderclient/tests/unit/v2/test_auth.py", line 157, in test_auth_call
    **self.TEST_REQUEST_BASE)
  File "/usr/lib/python3/dist-packages/mock.py", line 844, in assert_called_with
    raise AssertionError(msg)
AssertionError: Expected call: mock('POST', 'http://localhost:8776/v2/v2.0/tokens', allow_redirects=True, data='{"auth": {"tenantId": "tenant_id", "passwordCredentials": {"password": "password", "username": "username"}}}', verify=True, headers={'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'python-cinderclient'})
Actual call: mock('POST', 'http://localhost:8776/v2/v2.0/tokens', allow_redirects=True, data='{"auth": {"passwordCredentials": {"password": "password", "username": "username"}, "tenantId": "tenant_id"}}', verify=True, headers={'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'python-cinderclient'})
Traceback (most recent call last):
testtools.testresult.real._StringException: Empty attachments:
  stderr
  stdout

Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-cinderclient/build-area/python-cinderclient-1.2.2/cinderclient/tests/unit/v2/test_auth.py", line 167, in test_authenticate_tenant_id
    test_auth_call()
  File "/usr/lib/python3/dist-packages/mock.py", line 1210, in patched
    return func(*args, **keywargs)
  File "/home/zigo/sources/openstack/liberty/python-cinderclient/build-area/python-cinderclient-1.2.2/cinderclient/tests/unit/v2/test_auth.py", line 157, in test_auth_call
    **self.TEST_REQUEST_BASE)
  File "/usr/lib/python3/dist-packages/mock.py", line 844, in assert_called_with
    raise AssertionError(msg)
AssertionError: Expected call: mock('POST', 'http://localhost:8776/v2/v2.0/tokens', allow_redirects=True, data='{"auth": {"tenantId": "tenant_id", "passwordCredentials": {"password": "password", "username": "username"}}}', verify=True, headers={'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'python-cinderclient'})
Actual call: mock('POST', 'http://localhost:8776/v2/v2.0/tokens', allow_redirects=True, data='{"auth": {"passwordCredentials": {"password": "password", "username": "username"}, "tenantId": "tenant_id"}}', verify=True, headers={'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'python-cinderclient'})

Traceback (most recent call last):
testtools.testresult.real._StringException: Empty attachments:
  stderr
  stdout

Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-cinderclient/build-area/python-cinderclient-1.2.2/cinderclient/tests/unit/v2/test_auth.py", line 167, in test_authenticate_tenant_id
    test_auth_call()
  File "/usr/lib/python3/dist-packages/mock.py", line 1210, in patched
    return func(*args, **keywargs)
  File "/home/zigo/sources/openstack/liberty/python-cinderclient/build-area/python-cinderclient-1.2.2/cinderclient/tests/unit/v2/test_auth.py", line 157, in test_auth_call
    **self.TEST_REQUEST_BASE)
  File "/usr/lib/python3/dist-packages/mock.py", line 844, in assert_called_with
    raise AssertionError(msg)
AssertionError: Expected call: mock('POST', 'http://localhost:8776/v2/v2.0/tokens', allow_redirects=True, data='{"auth": {"tenantId": "tenant_id", "passwordCredentials": {"password": "password", "username": "username"}}}', verify=True, headers={'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'python-cinderclient'})
Actual call: mock('POST', 'http://localhost:8776/v2/v2.0/tokens', allow_redirects=True, data='{"auth": {"passwordCredentials": {"password": "password", "username": "username"}, "tenantId": "tenant_id"}}', verify=True, headers={'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'python-cinderclient'})

======================================================================
FAIL: process-returncode
process-returncode
----------------------------------------------------------------------
_StringException: returncode 1

----------------------------------------------------------------------
Ran 476 tests in 20.438s

FAILED (failures=3, skipped=4)

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

Is this still an issue? I think it may have been fixed indirectly since this was filed.

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

I didn't see the issue again, so it probably was fixed. I'll reopen this bug if I see it happening again. Thanks for taking care.

Revision history for this message
Sheel Rana (ranasheel2000) wrote :

Marking this issue invalid as this issue does not exist currently.
Please reopen if it happens to occur again..

Changed in python-cinderclient:
status: New → Invalid
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.