test: Update oauth benchmark tests

This commit is contained in:
Chris Coutinho
2025-10-18 22:02:25 +02:00
parent 644c59bf78
commit 371d0c93a5
2 changed files with 68 additions and 33 deletions
+7
View File
@@ -263,6 +263,13 @@ async def oauth_benchmark_worker(
f"Worker for {user_wrapper.username} completed {operation_count} operations"
)
except asyncio.CancelledError:
# Handle task cancellation gracefully (e.g., during benchmark shutdown)
logger.info(
f"Worker for {user_wrapper.username} was cancelled "
f"(completed {operation_count} operations)"
)
raise # Re-raise to allow proper cleanup
except Exception as e:
logger.error(f"Worker {user_wrapper.username} error: {e}", exc_info=True)