Skip to content

Commit 2dbdae0

Browse files
committed
correct python code
1 parent f1ffdff commit 2dbdae0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/lib/eventproducer_connector_upgrade.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ def check_events_from_topic(target):
3535
class_name = "kafka.tools.GetOffsetShell"
3636
else:
3737
class_name = "org.apache.kafka.tools.GetOffsetShell"
38-
output1 = subprocess.getoutput(f"echo $(/usr/local/kafka/bin/kafka-run-class.sh {class_name} --broker-list 'localhost:9092' --topic kafka_connect_upgrade --time -1 | grep -e ':[[:digit:]]*:' | awk -F ':' '{sum += $3} END {print sum}')")
39-
output2 = subprocess.getoutput(f"echo $(/usr/local/kafka/bin/kafka-run-class.sh {class_name} --broker-list 'localhost:9092' --topic kafka_connect_upgrade --time -2 | grep -e ':[[:digit:]]*:' | awk -F ':' '{sum += $3} END {print sum}')")
38+
output1 = subprocess.getoutput(f"echo $(/usr/local/kafka/bin/kafka-run-class.sh {class_name} --broker-list 'localhost:9092' --topic kafka_connect_upgrade --time -1"
39+
+ " | grep -e ':[[:digit:]]*:' | awk -F ':' '{sum += $3} END {print sum}')")
40+
output2 = subprocess.getoutput(f"echo $(/usr/local/kafka/bin/kafka-run-class.sh {class_name} --broker-list 'localhost:9092' --topic kafka_connect_upgrade --time -2"
41+
+ " | grep -e ':[[:digit:]]*:' | awk -F ':' '{sum += $3} END {print sum}')")
4042
time.sleep(5)
4143
if (int(output1)-int(output2))==target:
4244
logger.info("Events in the topic :" + str(int(output1)-int(output2)))

0 commit comments

Comments
 (0)