SIENTIAPDE-1205

Enhance unit tests for async shutdown and improve assertions

- Updated `test_app.py` to verify multiple calls to `asyncio_sleep` and ensure proper handling of sleep intervals.
- Added new tests in `test_ingestor.py` and `test_opc_manager.py` to validate shutdown behavior and error handling for async operations.
- Improved assertions in existing tests to enhance reliability and clarity of test outcomes.
This commit is contained in:
vitor-aignosi
2025-08-28 08:34:30 -03:00
parent f55604c7db
commit 102507d815
3 changed files with 45 additions and 6 deletions

View File

@@ -82,6 +82,13 @@ def ingestor_manager_started(ingestor):
return ingestor
@mark.asyncio
async def test_shutdown(ingestor_manager_started):
await ingestor_manager_started.shutdown()
ingestor_manager_started.ingestor_manager.shutdown.assert_called_once()
@mark.asyncio
async def test_handle_acquired_tags_not_acquired(ingestor_manager_started):
await ingestor_manager_started.handle_acquired_tags([])