]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Tests: Don't require binding to port 4444
authorEric Harney <eharney@redhat.com>
Fri, 13 Feb 2015 18:07:46 +0000 (13:07 -0500)
committerEric Harney <eharney@redhat.com>
Fri, 13 Feb 2015 18:20:08 +0000 (13:20 -0500)
If some other process is listening on port 4444,
test_server_pool_waitall will fail with:

RuntimeError: Could not bind to 127.0.0.1:4444 after
trying for 30 seconds

This test doesn't require use of this specific port,
so let it pick an unused port to avoid this failure.

Closes-Bug: #1421759

Change-Id: I7e6d6f574cd2bbb2fa067001bba4b09b5204a5e1

cinder/tests/test_wsgi.py

index af70696a19f71f01e9b9b3c0255eb57c14893c8d..a304abdcfd5f3b5140bb8fba066d7a38bfe198ad 100644 (file)
@@ -140,7 +140,7 @@ class TestWSGIServer(test.TestCase):
     def test_server_pool_waitall(self):
         # test pools waitall method gets called while stopping server
         server = cinder.wsgi.Server("test_server", None,
-                                    host="127.0.0.1", port=4444)
+                                    host="127.0.0.1")
         server.start()
         with mock.patch.object(server._pool,
                                'waitall') as mock_waitall: