Tests: Don't require binding to port 4444

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
This commit is contained in:
Eric Harney 2015-02-13 13:07:46 -05:00
parent 13c9cb143d
commit 8b0d47e715
1 changed files with 1 additions and 1 deletions

View 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: