From 8fcb1a86c3c25b533c7cbf2bac9b1484a32ad259 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 15 Nov 2021 12:34:19 +0300 Subject: [PATCH] Fix tests instability --- src/ExchangePlugin/Test/TestImportImage_1.py | 5 +++-- src/ExchangePlugin/Test/TestImportImage_2.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ExchangePlugin/Test/TestImportImage_1.py b/src/ExchangePlugin/Test/TestImportImage_1.py index 1fcc4645b..327caf623 100755 --- a/src/ExchangePlugin/Test/TestImportImage_1.py +++ b/src/ExchangePlugin/Test/TestImportImage_1.py @@ -101,5 +101,6 @@ assert(abs(dz-0) <= tol) import salome_utils import killSalomeWithPort -port = salome_utils.getPortNumber() -killSalomeWithPort.killMyPort(port) +port = salome_utils.getPortNumber(False) +if port: + killSalomeWithPort.killMyPort(port) diff --git a/src/ExchangePlugin/Test/TestImportImage_2.py b/src/ExchangePlugin/Test/TestImportImage_2.py index 7f26b06b2..fa214c76b 100755 --- a/src/ExchangePlugin/Test/TestImportImage_2.py +++ b/src/ExchangePlugin/Test/TestImportImage_2.py @@ -107,5 +107,6 @@ assert(abs(dz-0) <= tol) import salome_utils import killSalomeWithPort -port = salome_utils.getPortNumber() -killSalomeWithPort.killMyPort(port) +port = salome_utils.getPortNumber(False) +if port: + killSalomeWithPort.killMyPort(port) -- 2.39.2