Wrong eventlet version in requirements.txt makes unit test_memcached fail

Bug #1244597 reported by Tristan Cacqueray on 2013-10-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Undecided
Tristan Cacqueray

Bug Description

Swift All In One guide on ubuntu-12.04.3-server-amd64 will install eventlet==0.9.16.

This is fine according to swift/requirements.txt (eventlet>=0.9.15), though this version isn't enough for test_memcached.py unit test:

localadmin@controller:~/openstack/swift/test/unit$ nosetests --exe common/test_memcached.py
.F.........
======================================================================
FAIL: test_connection_pooling (test.unit.common.test_memcached.TestMemcached)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/localadmin/openstack/swift/test/unit/common/test_memcached.py", line 385, in test_connection_pooling
    self.assertEqual(2, len(connected))
AssertionError: 2 != 10

----------------------------------------------------------------------
Ran 11 tests in 0.347s

FAILED (failures=1)

Installing the version of requirements/global-requirements.txt fix the test:

localadmin@controller:~/openstack/swift/test/unit$ sudo pip install 'eventlet>=0.13.0'
Downloading/unpacking eventlet>=0.13.0
  Running setup.py egg_info for package eventlet

Requirement already satisfied (use --upgrade to upgrade): greenlet>=0.3 in /usr/lib/python2.7/dist-packages (from eventlet>=0.13.0)
Installing collected packages: eventlet
  Found existing installation: eventlet 0.9.16
    Uninstalling eventlet:
      Successfully uninstalled eventlet
  Running setup.py install for eventlet

Successfully installed eventlet
Cleaning up...
localadmin@controller:~/openstack/swift/test/unit$ nosetests -s --exe common/test_memcached.py
...........
----------------------------------------------------------------------
Ran 11 tests in 0.828s

OK

Samuel Merritt (torgomatic) wrote :

I love the part where the gate jobs throw away Swift's requirements.txt and swap in some other requirements.txt from some other place. What could possibly go wrong?

Samuel Merritt (torgomatic) wrote :

Alright, so the big question: is only the test broken, or is the code broken and the test working correctly?

Changed in swift:
status: New → Confirmed

We couldn't reproduce that failure on devstack (which have the correct eventlet version).

The test is fine, it is the eventlet-0.9.16 code that is broken:
test_memcached.py:test_connection_pooling creates 10 connexion in an eventlet pool limited to 2 connections. The assertion that there are only 2 connections failed because there is a bug in eventlet about current_size accounting in pools.Pool.

This is fixed in eventlet version 0.9.16.

I meant 0.9.17!
This is fixed in eventlet version 0.9.17 as stated here: https://github.com/eventlet/eventlet/blob/master/NEWS#L69

Changed in swift:
assignee: nobody → Tristan Cacqueray (tristan-cacqueray)
Changed in swift:
status: Confirmed → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers