testit-python-commons 4.2.2__tar.gz → 4.2.3__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.
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/PKG-INFO +2 -2
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/setup.py +2 -2
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/client/api_client.py +3 -4
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/services/sync_storage/sync_storage_runner.py +52 -1
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons.egg-info/PKG-INFO +2 -2
- testit_python_commons-4.2.3/src/testit_python_commons.egg-info/requires.txt +3 -0
- testit_python_commons-4.2.2/src/testit_python_commons.egg-info/requires.txt +0 -3
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/README.md +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/setup.cfg +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/__init__.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/api/__init__.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/api/completion_api.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/api/health_api.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/api/system_api.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/api/test_results_api.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/api/workers_api.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/api_client.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/apis/__init__.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/configuration.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/exceptions.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/model/__init__.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/model/completion_response.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/model/health_status_response.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/model/register_request.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/model/register_response.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/model/set_worker_status_request.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/model/set_worker_status_response.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/model/shutdown_response.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/model/test_result_cut_api_model.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/model/test_result_save_response.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/model_utils.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/models/__init__.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/rest.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/__init__.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/app_properties.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/client/__init__.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/client/client_configuration.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/client/converter.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/client/helpers/__init__.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/client/helpers/bulk_autotest_helper.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/client/helpers/threads_manager.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/client/models/__init__.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/client/models/threads_for_create_and_result.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/client/models/threads_for_update_and_result.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/configurations/__init__.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/configurations/properties_names.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/decorators.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/dynamic_methods.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/models/__init__.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/models/adapter_mode.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/models/fixture.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/models/link.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/models/link_type.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/models/outcome_type.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/models/status_type.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/models/step_result.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/models/test_result.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/models/test_result_with_all_fixture_step_results_model.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/services/__init__.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/services/adapter_manager.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/services/adapter_manager_configuration.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/services/fixture_manager.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/services/fixture_storage.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/services/logger.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/services/plugin_manager.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/services/retry.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/services/step_manager.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/services/step_result_storage.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/services/sync_storage/__init__.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/services/utils.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/step.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/utils/__init__.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/utils/html_escape_utils.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons.egg-info/SOURCES.txt +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons.egg-info/dependency_links.txt +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons.egg-info/top_level.txt +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/tests/test_app_properties.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/tests/test_dynamic_methods.py +0 -0
- {testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/tests/test_html_escape_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: testit-python-commons
|
|
3
|
-
Version: 4.2.
|
|
3
|
+
Version: 4.2.3
|
|
4
4
|
Summary: Python commons for Test IT
|
|
5
5
|
Home-page: https://github.com/testit-tms/adapters-python/
|
|
6
6
|
Author: Integration team
|
|
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
Requires-Dist: pluggy
|
|
19
19
|
Requires-Dist: tomli
|
|
20
|
-
Requires-Dist: testit-api-client==7.5.
|
|
20
|
+
Requires-Dist: testit-api-client==7.5.10
|
|
21
21
|
Dynamic: author
|
|
22
22
|
Dynamic: author-email
|
|
23
23
|
Dynamic: classifier
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from setuptools import find_packages, setup
|
|
2
2
|
|
|
3
|
-
VERSION = "4.2.
|
|
3
|
+
VERSION = "4.2.3"
|
|
4
4
|
|
|
5
5
|
setup(
|
|
6
6
|
name='testit-python-commons',
|
|
@@ -25,5 +25,5 @@ setup(
|
|
|
25
25
|
py_modules=['testit', 'testit_python_commons'],
|
|
26
26
|
packages=find_packages(where='src'),
|
|
27
27
|
package_dir={'': 'src'},
|
|
28
|
-
install_requires=['pluggy', 'tomli', 'testit-api-client==7.5.
|
|
28
|
+
install_requires=['pluggy', 'tomli', 'testit-api-client==7.5.10']
|
|
29
29
|
)
|
|
@@ -24,7 +24,6 @@ from testit_api_client.models import (
|
|
|
24
24
|
TestRunV2ApiResult,
|
|
25
25
|
LinkAutoTestToWorkItemRequest,
|
|
26
26
|
AutoTestWorkItemIdentifierApiResult,
|
|
27
|
-
ProjectModel,
|
|
28
27
|
WorkflowApiResult,
|
|
29
28
|
)
|
|
30
29
|
|
|
@@ -547,7 +546,7 @@ class ApiClientWorker:
|
|
|
547
546
|
|
|
548
547
|
@adapter_logger
|
|
549
548
|
@retry
|
|
550
|
-
def __get_project(self)
|
|
549
|
+
def __get_project(self):
|
|
551
550
|
return self.__projects_api.get_project_by_id(id=self.__config.get_project_id())
|
|
552
551
|
|
|
553
552
|
@adapter_logger
|
|
@@ -557,7 +556,7 @@ class ApiClientWorker:
|
|
|
557
556
|
|
|
558
557
|
@adapter_logger
|
|
559
558
|
def __get_status_codes(self) -> List[str]:
|
|
560
|
-
project
|
|
561
|
-
workflow
|
|
559
|
+
project = self.__get_project()
|
|
560
|
+
workflow = self.__get_workflow_by_id(project.workflow_id)
|
|
562
561
|
|
|
563
562
|
return [status.code for status in workflow.statuses]
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import json
|
|
1
2
|
import logging
|
|
2
3
|
import os
|
|
3
4
|
import platform
|
|
@@ -39,13 +40,15 @@ class SyncStorageRunner:
|
|
|
39
40
|
across multiple workers.
|
|
40
41
|
"""
|
|
41
42
|
|
|
42
|
-
SYNC_STORAGE_VERSION = "v0.3.
|
|
43
|
+
SYNC_STORAGE_VERSION = "v0.3.3"
|
|
43
44
|
SYNC_STORAGE_REPO_URL = (
|
|
44
45
|
"https://github.com/testit-tms/sync-storage-public/releases/download/"
|
|
45
46
|
)
|
|
46
47
|
AMD64 = "amd64"
|
|
47
48
|
ARM64 = "arm64"
|
|
48
49
|
SYNC_STORAGE_STARTUP_TIMEOUT = 5 # seconds
|
|
50
|
+
KEEP_ALIVE_INTERVAL_SECONDS = 30
|
|
51
|
+
KEEP_ALIVE_REQUEST_TIMEOUT_SECONDS = 5
|
|
49
52
|
|
|
50
53
|
def __init__(
|
|
51
54
|
self,
|
|
@@ -82,6 +85,9 @@ class SyncStorageRunner:
|
|
|
82
85
|
self.workers_api: Optional[WorkersApi] = None
|
|
83
86
|
self.test_results_api: Optional[TestResultsApi] = None
|
|
84
87
|
|
|
88
|
+
self._keep_alive_stop_event = threading.Event()
|
|
89
|
+
self._keep_alive_thread: Optional[threading.Thread] = None
|
|
90
|
+
|
|
85
91
|
logger.debug(
|
|
86
92
|
f"Initialized SyncStorageRunner with test_run_id={test_run_id}, port={self.port}"
|
|
87
93
|
)
|
|
@@ -113,6 +119,7 @@ class SyncStorageRunner:
|
|
|
113
119
|
except Exception as e:
|
|
114
120
|
logger.error(f"Error registering worker: {e}")
|
|
115
121
|
|
|
122
|
+
self._start_keep_alive()
|
|
116
123
|
return True
|
|
117
124
|
|
|
118
125
|
# Get executable file name for current platform
|
|
@@ -170,6 +177,7 @@ class SyncStorageRunner:
|
|
|
170
177
|
except Exception as e:
|
|
171
178
|
logger.error(f"Error registering worker: {e}")
|
|
172
179
|
|
|
180
|
+
self._start_keep_alive()
|
|
173
181
|
return True
|
|
174
182
|
else:
|
|
175
183
|
raise RuntimeError("Cannot start the SyncStorage until timeout")
|
|
@@ -213,6 +221,49 @@ class SyncStorageRunner:
|
|
|
213
221
|
"""Get the Sync Storage URL."""
|
|
214
222
|
return f"http://localhost:{self.port}"
|
|
215
223
|
|
|
224
|
+
def _keep_alive(self) -> None:
|
|
225
|
+
try:
|
|
226
|
+
payload = json.dumps({
|
|
227
|
+
"pid": self.worker_pid,
|
|
228
|
+
"testRunId": self.test_run_id,
|
|
229
|
+
}).encode("utf-8")
|
|
230
|
+
request = urllib.request.Request(
|
|
231
|
+
f"{self.get_url()}/keep_alive",
|
|
232
|
+
data=payload,
|
|
233
|
+
headers={"Content-Type": "application/json"},
|
|
234
|
+
method="POST",
|
|
235
|
+
)
|
|
236
|
+
urllib.request.urlopen(
|
|
237
|
+
request,
|
|
238
|
+
timeout=self.KEEP_ALIVE_REQUEST_TIMEOUT_SECONDS,
|
|
239
|
+
)
|
|
240
|
+
except Exception:
|
|
241
|
+
pass
|
|
242
|
+
|
|
243
|
+
def _keep_alive_loop(self) -> None:
|
|
244
|
+
while not self._keep_alive_stop_event.is_set():
|
|
245
|
+
self._keep_alive()
|
|
246
|
+
if self._keep_alive_stop_event.wait(self.KEEP_ALIVE_INTERVAL_SECONDS):
|
|
247
|
+
break
|
|
248
|
+
|
|
249
|
+
def _start_keep_alive(self) -> None:
|
|
250
|
+
if self._keep_alive_thread and self._keep_alive_thread.is_alive():
|
|
251
|
+
return
|
|
252
|
+
|
|
253
|
+
self._keep_alive_stop_event.clear()
|
|
254
|
+
self._keep_alive_thread = threading.Thread(
|
|
255
|
+
target=self._keep_alive_loop,
|
|
256
|
+
name="sync-storage-keep-alive",
|
|
257
|
+
daemon=True,
|
|
258
|
+
)
|
|
259
|
+
self._keep_alive_thread.start()
|
|
260
|
+
logger.debug("Sync Storage keep-alive thread started")
|
|
261
|
+
|
|
262
|
+
def _stop_keep_alive(self) -> None:
|
|
263
|
+
self._keep_alive_stop_event.set()
|
|
264
|
+
if self._keep_alive_thread and self._keep_alive_thread.is_alive():
|
|
265
|
+
self._keep_alive_thread.join(timeout=1)
|
|
266
|
+
|
|
216
267
|
def send_in_progress_test_result(
|
|
217
268
|
self, model: TestResultCutApiModel
|
|
218
269
|
) -> bool:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: testit-python-commons
|
|
3
|
-
Version: 4.2.
|
|
3
|
+
Version: 4.2.3
|
|
4
4
|
Summary: Python commons for Test IT
|
|
5
5
|
Home-page: https://github.com/testit-tms/adapters-python/
|
|
6
6
|
Author: Integration team
|
|
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
Requires-Dist: pluggy
|
|
19
19
|
Requires-Dist: tomli
|
|
20
|
-
Requires-Dist: testit-api-client==7.5.
|
|
20
|
+
Requires-Dist: testit-api-client==7.5.10
|
|
21
21
|
Dynamic: author
|
|
22
22
|
Dynamic: author-email
|
|
23
23
|
Dynamic: classifier
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/api_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/api_client_syncstorage/rest.py
RENAMED
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/decorators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/models/link.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.2.2 → testit_python_commons-4.2.3}/src/testit_python_commons/step.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|