Skip to content

Commit 0cea2a5

Browse files
authored
🔨 Fixes public-api tests (ITISFoundation#3649)
1 parent 3f8a317 commit 0cea2a5

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

‎packages/service-library/src/servicelib/mimetype_constants.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@
1010
# NOTE: mimetypes (https://docs.python.org/3/library/mimetypes.html) is already a module in python
1111

1212
MIMETYPE_APPLICATION_JSON = "application/json"
13+
MIMETYPE_TEXT_PLAIN = "text/plain"
14+
MIMETYPE_TEXT_HTML = "text/html"

‎requirements/how-to-unify-versions.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,8 @@ done
4949

5050
It would also be possible to upgrade them simultaneously by using ``--upgrade`` multiple times as ``pip-compile --upgrade X --upgrade Y ...``
5151
but we prefer to do it one by one and commit changes so that any issue can be tracked to the library upgrade
52+
53+
54+
TIP: Check the **Repo-wide overview of libraries** table in the report. Observe the libraries with multiple version in ``version-*`` columns. Note that we can use the script to unifyunify:
55+
- Those with no ``version-base`` and multiple in ``version-test``
56+
- Thos with multiple in ``version-base`` and non in ``version-test``

‎tests/public-api/test_solvers_jobs_api.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,12 @@ def test_create_job(
182182
_RETRY_POLICY_IF_LOGFILE_404_NOT_FOUND = dict(
183183
# NOTE: Only 404s https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404
184184
# are retried, the rest are failures
185+
#
186+
# CURRENT CONSTRAINT: Log-file should be ready in AT MOST 5 secs
187+
#
185188
retry=retry_if_exception_type(TryAgain),
186189
wait=wait_fixed(1),
187-
stop=stop_after_attempt(3),
190+
stop=stop_after_attempt(5),
188191
after=after_log(logger, logging.WARNING),
189192
reraise=True,
190193
)
@@ -289,7 +292,7 @@ def test_run_job(
289292
# NOTE: https://github.com/itisfoundation/osparc-simcore/issues/3569 shows
290293
# that this test might not have the logs ready in time and returns a 404 (not found)
291294
# for that reason we do a few retries before giving up
292-
for attempt in Retrying(_RETRY_POLICY_IF_LOGFILE_404_NOT_FOUND):
295+
for attempt in Retrying(**_RETRY_POLICY_IF_LOGFILE_404_NOT_FOUND):
293296
with attempt:
294297
try:
295298
logfile: str = solvers_api.get_job_output_logfile(

0 commit comments

Comments
 (0)