aiondemand / aiondemand/AIOD-rest-api

[Tests]: sporadic test failures in local pytest run

Aperta
#688 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
36
Fork
77
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I found some sporadic failures in the pytests while running: `pytest src/tests`. The tests are attached below:
```bash
=============================================== short test summary info ===============================================
FAILED src/tests/authorization/test_authorization.py::test_get_submission_by_id[latest] - AssertionError: assert '2026-02-12T10:55:41.703324' < '2026-02-12T10:55:41.703324'
FAILED src/tests/routers/resource_routers/test_router_dataset_generic_fields.py::test_update_aiod_entry[latest] - assert datetime.datetime(2026, 2, 12, 10, 56, 7, 459351, tzinfo=) < datetime.datetime(2026, 2, 12, 10, 56, 7, ...
FAILED src/tests/authorization/test_authorization.py::test_get_submission_by_id[v3] - AssertionError: assert '2026-02-12T10:56:37.685088' < '2026-02-12T10:56:37.685088'
FAILED src/tests/routers/generic/test_router_delete.py::test_delete_requires_admin[owner0-other0] - AssertionError: assert 403 ==
FAILED src/tests/routers/generic/test_router_delete.py::test_delete_requires_admin[owner1-other1] - AssertionError: assert 403 ==
FAILED src/tests/test_authentication.py::test_happy_path - AssertionError: Not all requests have been executed [('POST', 'http://keycloak:8080/aiod-auth/realms/aiod/protocol/...
FAILED src/tests/test_authentication.py::test_happy_path_privileged - AssertionError: Not all requests have been executed [('POST', 'http://keycloak:8080/aiod-auth/realms/aiod/protocol/...
FAILED src/tests/test_authentication.py::test_inactive_user - Failed: DID NOT RAISE
======================== 8 failed, 846 passed, 6 skipped, 13510 warnings in 119.74s (0:01:59) =========================
```

These failures happen sometimes while running pytests locally (2 out of 9 times faced). This needs a bit investigation.

source: https://github.com/aiondemand/aiondemand/pull/55#discussion_r2799245966

PO #681

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.