gopidesupavan commented on code in PR #47712:
URL: https://github.com/apache/airflow/pull/47712#discussion_r2018994749


##########
devel-common/src/tests_common/test_utils/api_client_helpers.py:
##########
@@ -0,0 +1,50 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from __future__ import annotations
+
+import requests
+from requests.adapters import HTTPAdapter
+from urllib3.util.retry import Retry
+
+
+def generate_jwt_token(username: str, password: str, host: str) -> str:
+    """
+    Generate valid JWT token for the given username and password.
+
+    Note: API server is currently using Simple Auth Manager.
+
+    :param username: The username to use for the login
+    :param password: The password to use for the login
+    :param host: The host to use for the login
+    :return: The JWT token
+    """
+    Retry.DEFAULT_BACKOFF_MAX = 32
+    retry = Retry(total=10, backoff_factor=1)

Review Comment:
   It would be good to add some `status_forcelist `  or provide a config? the 
default `status_forcelist` is None



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