pytest-bec-e2e 3.161.0__tar.gz → 3.162.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytest-bec-e2e
3
- Version: 3.161.0
3
+ Version: 3.162.0
4
4
  Summary: BEC pytest plugin for end-to-end tests
5
5
  Project-URL: Bug Tracker, https://github.com/bec-project/bec/issues
6
6
  Project-URL: Homepage, https://github.com/bec-project/bec
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "pytest-bec-e2e"
7
- version = "3.161.0"
7
+ version = "3.162.0"
8
8
  description = "BEC pytest plugin for end-to-end tests"
9
9
  requires-python = ">=3.11"
10
10
  classifiers = [
@@ -21,6 +21,9 @@ from bec_lib.tests.utils import wait_for_empty_queue
21
21
 
22
22
  RedisConnector.RETRY_ON_TIMEOUT = 1
23
23
 
24
+ CLIENT_SHUTDOWN_TIMEOUT_S = 10
25
+ SERVICE_STOP_TIMEOUT_S = 20
26
+
24
27
 
25
28
  class LogTestTool:
26
29
  def __init__(self, client: BECIPythonClient):
@@ -29,7 +32,8 @@ class LogTestTool:
29
32
 
30
33
  def fetch(self, count: int | None = None) -> None:
31
34
  """Fetch logs from the server and store them for interrogation, get all by default or get
32
- the last `count` logs (latter will not fetch read logs again if they have been seen!)"""
35
+ the last `count` logs (latter will not fetch read logs again if they have been seen!)
36
+ """
33
37
  log_data = self._conn.xread(MessageEndpoints.log(), from_start=(count is None), count=count)
34
38
  if log_data is None:
35
39
  self._logs = None
@@ -204,7 +208,7 @@ def bec_servers(
204
208
  try:
205
209
  yield
206
210
  finally:
207
- service_handler.stop(processes)
211
+ service_handler.stop(processes, timeout_s=SERVICE_STOP_TIMEOUT_S)
208
212
  else:
209
213
  # Nothing to do here: servers are supposed to be started externally.
210
214
  yield
@@ -221,7 +225,7 @@ def bec_ipython_client_with_demo_config(
221
225
  try:
222
226
  yield bec
223
227
  finally:
224
- bec.shutdown()
228
+ bec.shutdown(per_thread_timeout_s=CLIENT_SHUTDOWN_TIMEOUT_S)
225
229
  bec._client._reset_singleton()
226
230
 
227
231
 
@@ -234,7 +238,7 @@ def bec_client_lib_with_demo_config(bec_redis_fixture, bec_services_config_file_
234
238
  try:
235
239
  yield bec
236
240
  finally:
237
- bec.shutdown()
241
+ bec.shutdown(per_thread_timeout_s=CLIENT_SHUTDOWN_TIMEOUT_S)
238
242
  bec._client._reset_singleton()
239
243
 
240
244