14
0

- Add opensuse-fix-tests-1-core.patch custom patch to fix tests

running in OBS with limited resources, running on 1-core-VM.
  bsc#1233398

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-gvm?expand=0&rev=16
This commit is contained in:
2024-11-25 10:53:24 +00:00
committed by Git OBS Bridge
parent 31a6ed8821
commit a01309692e
3 changed files with 29 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
Index: python_gvm-24.8.0/tests/connections/test_unix_socket_connection.py
===================================================================
--- python_gvm-24.8.0.orig/tests/connections/test_unix_socket_connection.py
+++ python_gvm-24.8.0/tests/connections/test_unix_socket_connection.py
@@ -62,6 +62,13 @@ class UnixSocketConnectionTestCase(unitt
connection.disconnect()
def test_unix_socket_connection_connect_send_bytes_read(self):
+ # Add sleep to make sure setup theading server is up and
+ # running even with limited resources, bsc#1233398
+ import time
+ import multiprocessing
+ if multiprocessing.cpu_count() == 1:
+ time.sleep(2)
+
connection = UnixSocketConnection(
path=self.socket_name, timeout=DEFAULT_TIMEOUT
)