AutomationDev85 commented on code in PR #58033:
URL: https://github.com/apache/airflow/pull/58033#discussion_r2532856045


##########
providers/cncf/kubernetes/tests/unit/cncf/kubernetes/utils/test_pod_manager.py:
##########
@@ -59,30 +63,38 @@ def test_parse_log_line():
     assert line == log_message
 
 
+class DummyRetryState:
+    def __init__(self, exception=None):
+        # self.attempt_number = 1
+        self.outcome = mock.Mock() if exception is not None else None
+        if self.outcome:
+            self.outcome.exception = mock.Mock(return_value=exception)
+
+
+def test_get_retry_after_seconds_with_retry_after_header():
+    exc = ApiException(status=429)
+    exc.headers = {"Retry-After": "15"}
+    retry_state = DummyRetryState(exception=exc)
+    wait = get_retry_after_seconds(retry_state)
+    assert wait == 15
+
+
[email protected](("attempt_number, expected_wait"), [(1, 1), (4, 8)])

Review Comment:
   Ok I should rebased before the push to get the latest checks, fixed the 
missing " signs. Thanks!



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