aiondemand / aiondemand/AIOD-rest-api

[Tests]: sporadic test failures in local pytest run

未關閉
#688 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
36
分支
77
PR 合併指標
30 天內沒有已合併 PR

描述

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

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。