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:
@@ -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([])
|
||||
|
||||
Reference in New Issue
Block a user