mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix random failure related to ports
This commit is contained in:
1 parent
8d9da999e6
commit
f3e07d5ad9
4 files changed
+6
-23
No files matched your search
@@ -31,9 +31,9 @@ from gns3server.modules.port_manager import PortManager
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def manager():
|
||||
def manager(port_manager):
|
||||
m = VPCS.instance()
|
||||
m.port_manager = PortManager("127.0.0.1", False)
|
||||
m.port_manager = port_manager
|
||||
return m
|
||||
|
||||
|
||||
@@ -143,10 +143,12 @@ def test_change_console_port(vm, port_manager):
|
||||
port2 = port_manager.get_free_console_port()
|
||||
port_manager.release_console_port(port1)
|
||||
port_manager.release_console_port(port2)
|
||||
print(vm.console)
|
||||
print(port1)
|
||||
vm.console = port1
|
||||
vm.console = port2
|
||||
assert vm.console == port2
|
||||
PortManager.instance().reserve_console_port(port1)
|
||||
port_manager.reserve_console_port(port1)
|
||||
|
||||
|
||||
def test_change_name(vm, tmpdir):
|
||||
|
||||
Reference in new issue
Block a user