Skip to content

Commit

Permalink
fix natlab parity when setting ephemeral ports
Browse files Browse the repository at this point in the history
  • Loading branch information
gytsto committed Dec 9, 2024
1 parent c60eede commit ea04f35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Empty file added .unreleased/fix_port_parity
Empty file.
4 changes: 4 additions & 0 deletions nat-lab/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ async def on_output(output: str) -> None:

start_port = random.randint(5000, 55000)
num_ports = random.randint(2000, 5000)

if start_port % 2 == num_ports % 2:
start_port += 1

print(
datetime.now(),
f"Setting up ports for {vm_tag}: start={start_port}, num={num_ports}",
Expand Down

0 comments on commit ea04f35

Please sign in to comment.