Nidhs01 opened a new pull request, #64027:
URL: https://github.com/apache/airflow/pull/64027

   ### What does this PR do?
   
   Adds unit tests for `GenAICountTokensOperator` to verify correct execution 
behavior and proper exception propagation.
   
   ### Why is this change needed?
   
   Currently, there is no explicit test ensuring that `ClientError` exceptions 
raised from the underlying hook are properly propagated by the operator. This 
PR improves test coverage and ensures robustness of error handling.
   
   ### What changes were made?
   
   - Added unit test for successful execution of `GenAICountTokensOperator`
   - Added unit test to verify that `ClientError` is raised correctly when the 
hook fails
   - Used mocking to isolate operator behavior
   
   ### Does this PR introduce any user-facing changes?
   
   No.
   
   ### How was this tested?
   
   - Ran pytest locally:
   - ### What does this PR do?
   
   Adds unit tests for `GenAICountTokensOperator` to verify correct execution 
behavior and proper exception propagation.
   
   ### Why is this change needed?
   
   Currently, there is no explicit test ensuring that `ClientError` exceptions 
raised from the underlying hook are properly propagated by the operator. This 
PR improves test coverage and ensures robustness of error handling.
   
   ### What changes were made?
   
   - Added unit test for successful execution of `GenAICountTokensOperator`
   - Added unit test to verify that `ClientError` is raised correctly when the 
hook fails
   - Used mocking to isolate operator behavior
   
   ### Does this PR introduce any user-facing changes?
   
   No.
   
   ### How was this tested?
   
   - Ran pytest locally:
   ### What does this PR do?
   
   Adds unit tests for `GenAICountTokensOperator` to verify correct execution 
behavior and proper exception propagation.
   
   ### Why is this change needed?
   
   Currently, there is no explicit test ensuring that `ClientError` exceptions 
raised from the underlying hook are properly propagated by the operator. This 
PR improves test coverage and ensures robustness of error handling.
   
   ### What changes were made?
   
   - Added unit test for successful execution of `GenAICountTokensOperator`
   - Added unit test to verify that `ClientError` is raised correctly when the 
hook fails
   - Used mocking to isolate operator behavior
   
   ### Does this PR introduce any user-facing changes?
   
   No.
   
   ### How was this tested?
   
   - Ran pytest locally:      pytest 
airflow/providers/google/cloud/tests/unit/google/cloud/operators/test_gen_ai.py
   - - All tests passed successfully
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to