beobest2 commented on code in PR #38658:
URL: https://github.com/apache/airflow/pull/38658#discussion_r1602632380


##########
tests/providers/amazon/aws/sensors/test_emr_containers.py:
##########
@@ -84,3 +84,15 @@ def test_sensor_defer(self, mock_poke):
         assert isinstance(
             e.value.trigger, EmrContainerTrigger
         ), f"{e.value.trigger} is not a EmrContainerTrigger"
+
+    @mock.patch.object(
+        EmrContainerHook, "check_query_status", 
return_value=EmrContainerHook.INTERMEDIATE_STATES[0]
+    )
+    def test_sensor_defer_with_timeout(self, mock_check_query_status):
+        self.sensor.deferrable = True
+        self.sensor.max_polling_attempts = 1000
+
+        with pytest.raises(TaskDeferred):

Review Comment:
   I have modified the test code to only verify that the correct parameters are 
being passed to the trigger.



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