mirror of https://github.com/apache/kafka.git
kafka-1078; Update System Test to handle controller data returned by ZK; patched by John Fung; reviewed by Jun Rao
This commit is contained in:
parent
f53fe18361
commit
a6904a2644
|
@ -1878,10 +1878,16 @@ def get_controller_attributes(systemTestEnv, testcaseEnv):
|
||||||
logger.debug("executing command [" + cmdStr + "]", extra=d)
|
logger.debug("executing command [" + cmdStr + "]", extra=d)
|
||||||
subproc = system_test_utils.sys_call_return_subproc(cmdStr)
|
subproc = system_test_utils.sys_call_return_subproc(cmdStr)
|
||||||
for line in subproc.stdout.readlines():
|
for line in subproc.stdout.readlines():
|
||||||
brokerid = line.rstrip('\n')
|
if "brokerid" in line:
|
||||||
controllerDict["brokerid"] = brokerid
|
json_str = line.rstrip('\n')
|
||||||
controllerDict["entity_id"] = system_test_utils.get_data_by_lookup_keyval(
|
json_data = json.loads(json_str)
|
||||||
tcConfigsList, "broker.id", brokerid, "entity_id")
|
brokerid = str(json_data["brokerid"])
|
||||||
|
controllerDict["brokerid"] = brokerid
|
||||||
|
controllerDict["entity_id"] = system_test_utils.get_data_by_lookup_keyval(
|
||||||
|
tcConfigsList, "broker.id", brokerid, "entity_id")
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
|
||||||
return controllerDict
|
return controllerDict
|
||||||
|
|
||||||
def getMinCommonStartingOffset(systemTestEnv, testcaseEnv, clusterName="source"):
|
def getMinCommonStartingOffset(systemTestEnv, testcaseEnv, clusterName="source"):
|
||||||
|
|
Loading…
Reference in New Issue