Skip to content

Commit f13176f

Browse files
committed
tests: socket_comms: use alternate port
Don't use the default port for testing, as this will fail if there is a normal users of the libraries running in parallel. Signed-off-by: Jordan Yates <jordan@embeint.com>
1 parent 62e09b3 commit f13176f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/test_socket_comms.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77

88
def test_socket_comms():
99
# Ensure notifications can be sent from the server to the client, and requests sent in reverse
10-
mulicast_addr = comms.default_multicast_address()
11-
server = comms.LocalServer(mulicast_addr)
12-
client = comms.LocalClient(mulicast_addr)
10+
multicast_addr = comms.default_multicast_address()
11+
# Increment port by 1 so we can run the tests in parallel with a real instance
12+
test_addr = (multicast_addr[0], multicast_addr[1] + 1)
13+
server = comms.LocalServer(test_addr)
14+
client = comms.LocalClient(test_addr)
1315

1416
# Send request to server
1517
request = comms.GatewayRequestCommsCheck()

0 commit comments

Comments
 (0)