You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by rh...@apache.org on 2019/05/10 23:20:56 UTC
[kafka] branch trunk updated: KAFKA-8352 : Fix Connect System test
failure 404 Not Found (#6713)
This is an automated email from the ASF dual-hosted git repository.
rhauch pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 40d5c9f KAFKA-8352 : Fix Connect System test failure 404 Not Found (#6713)
40d5c9f is described below
commit 40d5c9fac92f019c46b1de15ee428e6f47544551
Author: Magesh Nandakumar <ma...@gmail.com>
AuthorDate: Fri May 10 16:20:40 2019 -0700
KAFKA-8352 : Fix Connect System test failure 404 Not Found (#6713)
Corrects the system tests to check for either a 404 or a 409 error and sleeping until the Connect REST API becomes available. This corrects a previous change to how REST extensions are initialized (#6651), which added the ability of Connect throwing a 404 if the resources are not yet started. The integration tests were already looking for 409.
Author: Magesh Nandakumar <ma...@gmail.com>
Reviewer: Randall Hauch <rh...@gmail.com>
---
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 40c2cf3..afd2bff 100644
--- a/tests/kafkatest/services/connect.py
+++ b/tests/kafkatest/services/connect.py
@@ -240,7 +240,7 @@ class ConnectServiceBase(KafkaPathResolverMixin, Service):
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 @@ class ConnectServiceBase(KafkaPathResolverMixin, Service):
return self._rest(path, body, node, method)
except ConnectRestError as e:
exception_to_throw = e
- if e.status != 409:
+ if e.status != 409 and e.status != 404:
break
time.sleep(retry_backoff)
raise exception_to_throw