Make sure used ports in a project are cleaned up when closing it.

This commit is contained in:
grossmj committed 2015-03-21 17:19:12 -06:00
1 parent 2d6d153262
commit 153914bf97
17 files changed
+127 -65

No files matched your search

+3 -3
View File
@@ -114,14 +114,14 @@ def port_manager():
@pytest.fixture(scope="function")
def free_console_port(request, port_manager):
def free_console_port(request, port_manager, project):
"""Get a free TCP port"""
# In case of already use ports we will raise an exception
port = port_manager.get_free_tcp_port()
port = port_manager.get_free_tcp_port(project)
# We release the port immediately in order to allow
# the test do whatever the test want
port_manager.release_tcp_port(port)
port_manager.release_tcp_port(port, project)
return port