From 2c6e84cb5081f4457c9468553293adeea73d618f Mon Sep 17 00:00:00 2001 From: fschuch Date: Wed, 4 Jan 2023 16:53:26 -0300 Subject: [PATCH] ASP-2438 code review add comments explaining the use of the fixture startup_event_force --- .../jobbergate_api/tests/apps/applications/test_routers.py | 2 ++ .../jobbergate_api/tests/apps/job_scripts/test_routers.py | 2 ++ .../jobbergate_api/tests/apps/job_submissions/test_routers.py | 2 ++ jobbergate-api/jobbergate_api/tests/test_pagination.py | 2 ++ jobbergate-api/jobbergate_api/tests/test_storage.py | 2 ++ 5 files changed, 10 insertions(+) diff --git a/jobbergate-api/jobbergate_api/tests/apps/applications/test_routers.py b/jobbergate-api/jobbergate_api/tests/apps/applications/test_routers.py index 2ec30bb4e..782243622 100644 --- a/jobbergate-api/jobbergate_api/tests/apps/applications/test_routers.py +++ b/jobbergate-api/jobbergate_api/tests/apps/applications/test_routers.py @@ -14,6 +14,8 @@ from jobbergate_api.apps.permissions import Permissions from jobbergate_api.storage import database, fetch_instance +# Force the async event loop at the app to begin. +# Since this is a time consuming fixture, it is just used were strict necessary. pytestmark = pytest.mark.usefixtures("startup_event_force") diff --git a/jobbergate-api/jobbergate_api/tests/apps/job_scripts/test_routers.py b/jobbergate-api/jobbergate_api/tests/apps/job_scripts/test_routers.py index d08cf095d..ffc8499d4 100644 --- a/jobbergate-api/jobbergate_api/tests/apps/job_scripts/test_routers.py +++ b/jobbergate-api/jobbergate_api/tests/apps/job_scripts/test_routers.py @@ -18,6 +18,8 @@ from jobbergate_api.apps.permissions import Permissions from jobbergate_api.storage import database +# Force the async event loop at the app to begin. +# Since this is a time consuming fixture, it is just used were strict necessary. pytestmark = pytest.mark.usefixtures("startup_event_force") diff --git a/jobbergate-api/jobbergate_api/tests/apps/job_submissions/test_routers.py b/jobbergate-api/jobbergate_api/tests/apps/job_submissions/test_routers.py index e76d70b43..f6c9d3d05 100644 --- a/jobbergate-api/jobbergate_api/tests/apps/job_submissions/test_routers.py +++ b/jobbergate-api/jobbergate_api/tests/apps/job_submissions/test_routers.py @@ -16,6 +16,8 @@ from jobbergate_api.apps.permissions import Permissions from jobbergate_api.storage import database +# Force the async event loop at the app to begin. +# Since this is a time consuming fixture, it is just used were strict necessary. pytestmark = pytest.mark.usefixtures("startup_event_force") diff --git a/jobbergate-api/jobbergate_api/tests/test_pagination.py b/jobbergate-api/jobbergate_api/tests/test_pagination.py index 8a64d70cd..7e36f734c 100644 --- a/jobbergate-api/jobbergate_api/tests/test_pagination.py +++ b/jobbergate-api/jobbergate_api/tests/test_pagination.py @@ -12,6 +12,8 @@ from jobbergate_api.pagination import Pagination, Response, package_response from jobbergate_api.storage import database +# Force the async event loop at the app to begin. +# Since this is a time consuming fixture, it is just used were strict necessary. pytestmark = pytest.mark.usefixtures("startup_event_force") diff --git a/jobbergate-api/jobbergate_api/tests/test_storage.py b/jobbergate-api/jobbergate_api/tests/test_storage.py index 67de4d00a..463a44715 100644 --- a/jobbergate-api/jobbergate_api/tests/test_storage.py +++ b/jobbergate-api/jobbergate_api/tests/test_storage.py @@ -10,6 +10,8 @@ from jobbergate_api.metadata import metadata from jobbergate_api.storage import build_db_url, database, sort_clause +# Force the async event loop at the app to begin. +# Since this is a time consuming fixture, it is just used were strict necessary. pytestmark = pytest.mark.usefixtures("startup_event_force")