kaxil commented on code in PR #68206:
URL: https://github.com/apache/airflow/pull/68206#discussion_r3376133789


##########
task-sdk/tests/task_sdk/bases/test_resumablemixin.py:
##########
@@ -197,3 +198,46 @@ class CustomKeyOp(ConcreteResumableOperator):
         op.execute_resumable(make_context(task_state))
 
         assert task_state.get("my_custom_key") == "job-001"
+
+
+class TestLogging:
+    def test_warning_when_task_store_unavailable(self):
+        op = ConcreteResumableOperator(task_id="test_task")
+        with structlog.testing.capture_logs() as logs:
+            op.execute_resumable(make_context(task_store=None))
+        warnings = [entry for entry in logs if entry["log_level"] == "warning"]
+        assert any("crash recovery is disabled" in entry["event"] for entry in 
warnings)
+
+    def test_info_reconnect_with_structured_fields(self):

Review Comment:
   +1



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