Skip to content

Commit

Permalink
Fix: test for deferable operation
Browse files Browse the repository at this point in the history
  • Loading branch information
beobest2 committed May 2, 2024
1 parent bac4ede commit 67c7eda
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions tests/providers/amazon/aws/operators/test_emr_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ def test_operator_defer_with_timeout(self, mock_submit_job, mock_check_query_sta
self.emr_container.deferrable = True
self.emr_container.max_polling_attempts = 1000

error_match = "Waiter error: max attempts reached"
with pytest.raises(AirflowException, match=error_match):
with pytest.raises(TaskDeferred):
self.emr_container.execute(context=None)

assert mock_check_query_status.call_count == 1000
Expand Down
3 changes: 1 addition & 2 deletions tests/providers/amazon/aws/sensors/test_emr_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ def test_sensor_defer_with_timeout(self, mock_check_query_status):
self.sensor.deferrable = True
self.sensor.max_polling_attempts = 1000

error_match = "Waiter error: max attempts reached"
with pytest.raises(TaskDeferred, match=error_match):
with pytest.raises(TaskDeferred):
self.sensor.execute(context=None)

assert mock_check_query_status.call_count == 1000

0 comments on commit 67c7eda

Please sign in to comment.