Py3 unit test failures when building debian package

Bug #1482555 reported by Thomas Goirand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tooz
New
Medium
Unassigned

Bug Description

Hi,

I had to disable Py3 unit tests in the version 1.21.0-1 which I uploaded today to Debian Experimental because of the below unit test failures. It's looking like a concurrent.futures issue with the latest Python 3.4 in Sid (but it's hard to tell for me).

======================================================================
FAIL: tests.test_coordination.TestAPI.test_create_group(file)
tests.test_coordination.TestAPI.test_create_group(file)
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/__init__.py", line 29, in skip_if_not_implemented
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/test_coordination.py", line 103, in test_create_group
    all_group_ids = self._coord.get_groups().get()
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 405, in get
    return self._fut.result(timeout=timeout)
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 402, in result
    return self.__get_result()
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 57, in decorator
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 356, in _do_get_groups
    groups.append(_read_group_id(path))
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 348, in _read_group_id
    return details['group_id']
KeyError: 'group_id'

======================================================================
FAIL: tests.test_coordination.TestAPI.test_delete_group(file)
tests.test_coordination.TestAPI.test_delete_group(file)
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/__init__.py", line 29, in skip_if_not_implemented
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/test_coordination.py", line 122, in test_delete_group
    all_group_ids = self._coord.get_groups().get()
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 405, in get
    return self._fut.result(timeout=timeout)
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 402, in result
    return self.__get_result()
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 57, in decorator
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 356, in _do_get_groups
    groups.append(_read_group_id(path))
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 348, in _read_group_id
    return details['group_id']
KeyError: 'group_id'

======================================================================
FAIL: tests.test_coordination.TestAPI.test_get_groups(file)
tests.test_coordination.TestAPI.test_get_groups(file)
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/__init__.py", line 29, in skip_if_not_implemented
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/test_coordination.py", line 116, in test_get_groups
    created_groups = self._coord.get_groups().get()
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 405, in get
    return self._fut.result(timeout=timeout)
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 402, in result
    return self.__get_result()
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 57, in decorator
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 356, in _do_get_groups
    groups.append(_read_group_id(path))
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 348, in _read_group_id
    return details['group_id']
KeyError: 'group_id'

======================================================================
FAIL: tests.test_coordination.TestAPI.test_leave_group(file)
tests.test_coordination.TestAPI.test_leave_group(file)
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/__init__.py", line 29, in skip_if_not_implemented
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/test_coordination.py", line 168, in test_leave_group
    all_group_ids = self._coord.get_groups().get()
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 405, in get
    return self._fut.result(timeout=timeout)
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 402, in result
    return self.__get_result()
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 57, in decorator
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 356, in _do_get_groups
    groups.append(_read_group_id(path))
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 348, in _read_group_id
    return details['group_id']
KeyError: 'group_id'

======================================================================
FAIL: tests.test_coordination.TestAPI.test_leave_group_not_joined_by_member(file)
tests.test_coordination.TestAPI.test_leave_group_not_joined_by_member(file)
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/__init__.py", line 29, in skip_if_not_implemented
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/test_coordination.py", line 191, in test_leave_group_not_joined_by_member
    all_group_ids = self._coord.get_groups().get()
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 405, in get
    return self._fut.result(timeout=timeout)
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 402, in result
    return self.__get_result()
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 57, in decorator
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 356, in _do_get_groups
    groups.append(_read_group_id(path))
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 348, in _read_group_id
    return details['group_id']
KeyError: 'group_id'

======================================================================
FAIL: tests.test_coordination.TestAPI.test_leave_nonexistent_group(file)
tests.test_coordination.TestAPI.test_leave_nonexistent_group(file)
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/__init__.py", line 29, in skip_if_not_implemented
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/test_coordination.py", line 181, in test_leave_nonexistent_group
    all_group_ids = self._coord.get_groups().get()
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 405, in get
    return self._fut.result(timeout=timeout)
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 402, in result
    return self.__get_result()
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 57, in decorator
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 356, in _do_get_groups
    groups.append(_read_group_id(path))
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 348, in _read_group_id
    return details['group_id']
KeyError: 'group_id'

======================================================================
FAIL: tests.test_coordination.TestAPI.test_watch_group_join(file)
tests.test_coordination.TestAPI.test_watch_group_join(file)
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/__init__.py", line 29, in skip_if_not_implemented
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/test_coordination.py", line 343, in test_watch_group_join
    if self._coord.run_watchers():
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/coordination.py", line 358, in run_watchers
    timeout=w.leftover(return_none=True))
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 405, in get
    return self._fut.result(timeout=timeout)
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 402, in result
    return self.__get_result()
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 57, in decorator
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 356, in _do_get_groups
    groups.append(_read_group_id(path))
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 348, in _read_group_id
    return details['group_id']
KeyError: 'group_id'

======================================================================
FAIL: tests.test_coordination.TestAPI.test_watch_join_group_booted_out(file)
tests.test_coordination.TestAPI.test_watch_join_group_booted_out(file)
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/__init__.py", line 29, in skip_if_not_implemented
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/test_coordination.py", line 457, in test_watch_join_group_booted_out
    if self._coord.run_watchers():
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/coordination.py", line 358, in run_watchers
    timeout=w.leftover(return_none=True))
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 405, in get
    return self._fut.result(timeout=timeout)
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 402, in result
    return self.__get_result()
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 57, in decorator
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 356, in _do_get_groups
    groups.append(_read_group_id(path))
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 348, in _read_group_id
    return details['group_id']
KeyError: 'group_id'

======================================================================
FAIL: tests.test_coordination.TestAPI.test_watch_leave_group(file)
tests.test_coordination.TestAPI.test_watch_leave_group(file)
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/__init__.py", line 29, in skip_if_not_implemented
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/tests/test_coordination.py", line 380, in test_watch_leave_group
    if self._coord.run_watchers():
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/coordination.py", line 358, in run_watchers
    timeout=w.leftover(return_none=True))
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 405, in get
    return self._fut.result(timeout=timeout)
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 402, in result
    return self.__get_result()
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 57, in decorator
    return func(*args, **kwargs)
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 356, in _do_get_groups
    groups.append(_read_group_id(path))
  File "/home/zigo/sources/openstack/liberty/python-tooz/build-area/python-tooz-1.21.0/tooz/drivers/file.py", line 348, in _read_group_id
    return details['group_id']

Changed in python-tooz:
status: New → Confirmed
Julien Danjou (jdanjou)
Changed in python-tooz:
status: Confirmed → Triaged
importance: Undecided → Medium
Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Julien,

FYI, I have uploaded python-tooz to Experimental with Py3 tests disabled. If you want to try yourself, just add $(PYTHON3S) in the test for loop.

Cheers,

Thomas

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

is this still a problem?

Changed in python-tooz:
status: Triaged → Incomplete
Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Yes, its still a problem, please don't close this bug.

Changed in python-tooz:
status: Incomplete → New
Revision history for this message
Mehdi Abaakouk (sileht) wrote :

You just needs to cleanup /tmp/groups between tests run.

Files generated in python2 and python3 are not compatibles between versions.

This is a wider issue that we need to track across multiple libs, I have opened another bug on this subject: https://bugs.launchpad.net/oslo.serialization/+bug/1556081

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.