Skip to content
Snippets Groups Projects

run UC as python implementation

Closed Björn Vonheiden requested to merge stu202077/theodolite:feature/runUcPython into master
1 file
+ 8
8
Compare changes
  • Side-by-side
  • Inline
+ 8
8
@@ -396,8 +396,8 @@ def reset_zookeeper():
@@ -396,8 +396,8 @@ def reset_zookeeper():
'--',
'--',
'bash',
'bash',
'-c',
'-c',
'zookeeper-shell my-confluent-cp-zookeeper:2181 deleteall'
'zookeeper-shell my-confluent-cp-zookeeper:2181 deleteall '
+ ' /workload-generation'
+ '/workload-generation'
]
]
check_zoo_data_command = [
check_zoo_data_command = [
@@ -407,8 +407,8 @@ def reset_zookeeper():
@@ -407,8 +407,8 @@ def reset_zookeeper():
'--',
'--',
'bash',
'bash',
'-c',
'-c',
'zookeeper-shell my-confluent-cp-zookeeper:2181 ls /'
'zookeeper-shell my-confluent-cp-zookeeper:2181 get '
# "| awk -F[\]\[] '{print $2}'"
+ '/workload-generation'
]
]
# Wait for configuration deletion
# Wait for configuration deletion
@@ -425,12 +425,12 @@ def reset_zookeeper():
@@ -425,12 +425,12 @@ def reset_zookeeper():
text=True)
text=True)
logging.debug(output)
logging.debug(output)
if 'workload-generation' in output.stdout:
if output.returncode == 1: # Means data not available anymore
print('ZooKeeper reset was not successful. Retrying in 5s.')
time.sleep(5)
else:
print('ZooKeeper reset was successful.')
print('ZooKeeper reset was successful.')
break
break
 
else:
 
print('ZooKeeper reset was not successful. Retrying in 5s.')
 
time.sleep(5)
return
return
Loading