From 26580a850d22a845c4f4934be5c9c967b50245ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gytis=20Sto=C5=A1kevi=C4=8Dius?= Date: Mon, 9 Dec 2024 12:14:34 +0200 Subject: [PATCH] fix natlab parity when setting ephemeral ports --- .unreleased/fix_port_parity | 0 nat-lab/tests/conftest.py | 3 +++ 2 files changed, 3 insertions(+) create mode 100644 .unreleased/fix_port_parity diff --git a/.unreleased/fix_port_parity b/.unreleased/fix_port_parity new file mode 100644 index 000000000..e69de29bb diff --git a/nat-lab/tests/conftest.py b/nat-lab/tests/conftest.py index 2d7028875..9cf74962b 100644 --- a/nat-lab/tests/conftest.py +++ b/nat-lab/tests/conftest.py @@ -74,6 +74,9 @@ async def on_output(output: str) -> None: start_port = random.randint(5000, 55000) num_ports = random.randint(2000, 5000) + if (num_ports - start_port) % 2: + num_ports += 1 + print( datetime.now(), f"Setting up ports for {vm_tag}: start={start_port}, num={num_ports}",