Skip to content

Commit b8f6078

Browse files
committed
Fixes a test issue at start and at consumer error
1 parent 46860eb commit b8f6078

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kafka/test/kafkacat.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ data:
2323
echo "${UNIQUE: -41:5}:Test $UNIQUE" >> /shared/produce.tmp
2424
sleep $PC_WAIT
2525
LAST=$(tail -n 1 /shared/consumed.tmp)
26+
[ -z "$LAST" ] && echo "Nothing consumed" && exit 1
2627
2728
LAST_TS=$(echo $LAST | awk -F';' '{print $1}')
29+
[ -z "$LAST_TS" ] && echo "Failed to get timestamp for message: $LAST" && exit 1
2830
LAST_MSG=$(echo $LAST | awk -F';' '{print $4}')
2931
NOW=$(date -u +%s%3N)
3032
DIFF_S=$((($NOW - $LAST_TS)/1000))

0 commit comments

Comments
 (0)