Skip to content

Commit

Permalink
test_simulator: use unused_tcp_port fixture (#2141)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilkka-ollakka committed Apr 2, 2024
1 parent 6b728ec commit a2e82d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/sub_server/test_simulator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test datastore."""

import asyncio
import copy
import json
Expand Down Expand Up @@ -582,9 +583,9 @@ def test_simulator_action_random(self, celltype, minval, maxval):
)
),
)
async def test_simulator_server_tcp(self):
async def test_simulator_server_tcp(self, unused_tcp_port):
"""Test init simulator server."""
task = ModbusSimulatorServer()
task = ModbusSimulatorServer(http_port=unused_tcp_port)
await task.run_forever(only_start=True)
await asyncio.sleep(0.5)
await task.stop()

0 comments on commit a2e82d5

Please sign in to comment.