From f32e97cc4faf6ad1dcaf1f7bb30c5e197a05277c Mon Sep 17 00:00:00 2001 From: Magesh Nandakumar Date: Fri, 10 May 2019 13:34:58 -0700 Subject: [PATCH 1/2] KAFKA-8352 : Fix Connect System test failure 404 Not Found --- tests/kafkatest/services/connect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/kafkatest/services/connect.py b/tests/kafkatest/services/connect.py index 40c2cf3d9aaf8..f17b8f0325dc8 100644 --- a/tests/kafkatest/services/connect.py +++ b/tests/kafkatest/services/connect.py @@ -240,7 +240,7 @@ def _rest(self, path, body=None, node=None, method="GET"): def _rest_with_retry(self, path, body=None, node=None, method="GET", retries=40, retry_backoff=.25): """ Invokes a REST API with retries for errors that may occur during normal operation (notably 409 CONFLICT - responses that can occur due to rebalancing). + responses that can occur due to rebalancing or 404 when the connect resources are not initialized yet). """ exception_to_throw = None for i in range(0, retries + 1): @@ -248,7 +248,7 @@ def _rest_with_retry(self, path, body=None, node=None, method="GET", retries=40, return self._rest(path, body, node, method) except ConnectRestError as e: exception_to_throw = e - if e.status != 409: + if e.status != 409 or e.status != 404: break time.sleep(retry_backoff) raise exception_to_throw From d288cbf1ff8ac01729e03af44e9814ebc28baf65 Mon Sep 17 00:00:00 2001 From: Magesh Nandakumar Date: Fri, 10 May 2019 13:36:49 -0700 Subject: [PATCH 2/2] KAFKA-8352 : Fix Connect System test failure 404 Not Found --- tests/kafkatest/services/connect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/kafkatest/services/connect.py b/tests/kafkatest/services/connect.py index f17b8f0325dc8..afd2bffabbd83 100644 --- a/tests/kafkatest/services/connect.py +++ b/tests/kafkatest/services/connect.py @@ -248,7 +248,7 @@ def _rest_with_retry(self, path, body=None, node=None, method="GET", retries=40, return self._rest(path, body, node, method) except ConnectRestError as e: exception_to_throw = e - if e.status != 409 or e.status != 404: + if e.status != 409 and e.status != 404: break time.sleep(retry_backoff) raise exception_to_throw