fat-catTW commented on code in PR #76381:
URL: https://github.com/apache/airflow/pull/76381#discussion_r4483435330


##########
providers/common/ai/tests/unit/common/ai/durable/test_storage.py:
##########
@@ -82,6 +82,13 @@ def test_a_retry_reads_what_the_previous_attempt_wrote(self, 
storage):
     def test_missing_key_is_none(self, storage):
         assert storage.load_step("missing") is None
 
+    @patch.object(ObjectStoragePath, "read_text", autospec=True, 
side_effect=OSError("S3 is unavailable"))
+    def 
test_a_storage_read_failure_stops_the_task_before_it_can_replay_live(self, _, 
storage, caplog):
+        with pytest.raises(OSError, match="S3 is unavailable"):
+            storage.load_step("k")
+
+        assert "Durable: could not load journal; stopping task to avoid 
replaying steps" in caplog

Review Comment:
   Thanks for the review!
   I removed the log assertion and `caplog` argument. Kept `pytest.raises` to 
verify the error propagates.



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