Socket related unit tests fail on FreeBSD

Bug #1467145 reported by Roman Bogorodskiy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Roman Bogorodskiy

Bug Description

Due to different behavior of SO_REUSEADDR on Linux and BSD some unit tests fail, e.g.:

nova.tests.unit.test_wsgi.TestWSGIServer.test_socket_options_for_simple_server
------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "nova/tests/unit/test_wsgi.py", line 140, in test_socket_options_for_simple_server
        socket.SO_REUSEADDR))
      File "/usr/home/novel/code/openstack/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/usr/home/novel/code/openstack/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: 1 != 4

Captured pythonlogging:
~~~~~~~~~~~~~~~~~~~~~~~
    2015-06-20 17:32:52,230 INFO [nova.wsgi] test_socket_options listening on 127.0.0.1:60566

Similar (or I'd say the same) problem was reported and fixed for OS X: https://bugs.launchpad.net/nova/+bug/1436895

Changed in nova:
assignee: nobody → Roman Bogorodskiy (novel)
status: New → In Progress
Revision history for this message
Roman Bogorodskiy (novel) wrote :
Changed in nova:
importance: Undecided → Low
status: In Progress → Triaged
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/191522
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d0b103d699c13a9d282fbaa2047118f575955d52
Submitter: Jenkins
Branch: master

commit d0b103d699c13a9d282fbaa2047118f575955d52
Author: Roman Bogorodskiy <email address hidden>
Date: Sat Jun 13 21:13:34 2015 +0300

    Skip SO_REUSEADDR tests on BSD

    Commit e9c48d5 fixed socket tests issues on OSX related to
    SO_REUSEADDR that were reported in bug #1436895. The same behaviour
    applies to BSD as well, so make this fix more general and run the
    tests on Linux only.

    Closes-bug: #1467145
    Change-Id: I09c2969658c4716d06b22513d321006f31d57baa

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-3 → 12.0.0
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.