fix(configs): use EXECUTOR_NUMBER for port offset

Using BUILD_NUMBER is not the worst, but this is a more directly correct way.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-12-07 17:21:07 +01:00 committed by Anastasiya
parent 8dfc0b0ec9
commit 122b1c0d08
3 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
import os
AUT_PORT = 61500 + int(os.getenv('BUILD_NUMBER', 0))
SERVER_PORT = 4322 + int(os.getenv('BUILD_NUMBER', 0))
AUT_PORT = 61500 + int(os.getenv('EXECUTOR_NUMBER', 0)) * 100
SERVER_PORT = 4322 + int(os.getenv('EXECUTOR_NUMBER', 0)) * 100
CURSOR_ANIMATION = False

View File

@ -100,7 +100,7 @@ class AUT:
@allure.step('Start AUT')
def startaut(self):
LOG.info('Launching AUT: %s', self.path)
self.port = local_system.find_free_port(configs.squish.AUT_PORT, 100)
self.port = local_system.find_free_port(configs.squish.AUT_PORT, 10)
command = [
str(configs.testpath.SQUISH_DIR / 'bin/startaut'),
f'--port={self.port}',

View File

@ -25,7 +25,7 @@ class SquishServer:
@classmethod
def start(cls):
cls.port = local_system.find_free_port(configs.squish.SERVER_PORT, 100)
cls.port = local_system.find_free_port(configs.squish.SERVER_PORT, 10)
LOG.info('Starting Squish Server on port: %d', cls.port)
cmd = [
str(cls.path),