From: vsr Date: Mon, 15 Nov 2021 09:34:19 +0000 (+0300) Subject: Fix tests instability X-Git-Tag: V9_8_0rc1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8fcb1a86c3c25b533c7cbf2bac9b1484a32ad259;p=modules%2Fshaper.git Fix tests instability --- 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)