File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,14 @@ def check_events_from_topic(target):
3131 time .sleep (5 )
3232 while time .time () < t_end :
3333 kafka_version_flag = os .environ .get ("CI_KAFKA_VERSION_BEFORE_3_7" )
34- if kafka_version_flag :
34+ if kafka_version_flag == "true" :
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 )))
You can’t perform that action at this time.
0 commit comments