nailo2c commented on code in PR #67621:
URL: https://github.com/apache/airflow/pull/67621#discussion_r3567696957


##########
providers/google/tests/unit/google/cloud/sensors/test_pubsub.py:
##########


Review Comment:
   Maybe we also need to test `return_immediately=False` here?



##########
providers/google/tests/unit/google/cloud/operators/test_pubsub.py:
##########
@@ -526,9 +542,12 @@ def test_execute_deferred(self, mock_hook):
             subscription=TEST_SUBSCRIPTION,
             deferrable=True,
         )
-        with pytest.raises(TaskDeferred) as _:
+        with pytest.raises(TaskDeferred) as exc:
             task.execute(mock.MagicMock())
 
+        assert isinstance(exc.value.trigger, PubsubPullTrigger)
+        assert exc.value.trigger.return_immediately is True

Review Comment:
   I saw other test functions cover `return_immediately=False`, so I think 
`test_execute_deferred` should cover it as well to prevent a regression in the 
deferrable path.



-- 
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