← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1296768] Re: keystone.tests.test_wsgi.ServerTest.test_keepalive_and_keepidle_set MismatchError: 1 != 2

 

** Changed in: keystone
       Status: Fix Committed => Fix Released

** Changed in: keystone
    Milestone: None => icehouse-rc1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1296768

Title:
  keystone.tests.test_wsgi.ServerTest.test_keepalive_and_keepidle_set
  MismatchError: 1 != 2

Status in OpenStack Identity (Keystone):
  Fix Released

Bug description:
  The following test consistently fails in OS X:

  ======================================================================
  FAIL: keystone.tests.test_wsgi.ServerTest.test_keepalive_and_keepidle_set
  ----------------------------------------------------------------------
  _StringException: pythonlogging:'': {{{
  Adding cache-proxy 'keystone.tests.test_cache.CacheIsolatingProxy' to backend.
  Starting /Users/dolph/Environments/os/bin/nosetests on 127.0.0.1:1234
  }}}

  Traceback (most recent call last):
    File "/Users/dolph/Environments/os/lib/python2.7/site-packages/mock.py", line 1201, in patched
      return func(*args, **keywargs)
    File "/Users/dolph/Projects/keystone/keystone/tests/test_wsgi.py", line 319, in test_keepalive_and_keepidle_set
      self.assertEqual(mock_sock.setsockopt.call_count, 2)
    File "/Users/dolph/Environments/os/lib/python2.7/site-packages/testtools/testcase.py", line 321, in assertEqual
      self.assertThat(observed, matcher, message)
    File "/Users/dolph/Environments/os/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
      raise mismatch_error
  MismatchError: 1 != 2

  According to keystone.common.environment.__init__, the expected
  behavior varies for OS X:

    # Optionally enable keepalive on the wsgi socket.
    # This option isn't available in the OS X version of eventlet

  But the test is written without the same flexibility. To demonstrate
  on OS X:

  $ python --version
  Python 2.7.6

  $ uname
  Darwin

  $ python -c "import socket; print(socket.TCP_KEEPIDLE)"
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  AttributeError: 'module' object has no attribute 'TCP_KEEPIDLE'

  $ python -c "import eventlet; eventlet.patcher.monkey_patch(socket=True); import socket; print(socket.TCP_KEEPIDLE)"
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  AttributeError: 'module' object has no attribute 'TCP_KEEPIDLE'

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1296768/+subscriptions


References