MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / test_port_in_use

Method test_port_in_use

tests/tests_server.py:617–631  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

615class TestServerStartError(unittest.TestCase):
616
617 def test_port_in_use(self):
618
619 server1 = Server()
620 server1.set_endpoint('opc.tcp://127.0.0.1:{0:d}'.format(port_num + 1))
621 server1.start()
622
623 server2 = Server()
624 server2.set_endpoint('opc.tcp://127.0.0.1:{0:d}'.format(port_num + 1))
625 try:
626 server2.start()
627 except Exception:
628 pass
629
630 server1.stop()
631 server2.stop()

Callers

nothing calls this directly

Calls 4

set_endpointMethod · 0.95
startMethod · 0.95
stopMethod · 0.95
ServerClass · 0.90

Tested by

no test coverage detected