diff options
author | Staffan Olsson <staffan@repos.se> | 2017-10-15 20:41:57 +0200 |
---|---|---|
committer | Staffan Olsson <staffan@repos.se> | 2017-11-09 13:48:51 +0100 |
commit | 41938168dc6312439de842e649ce1a13b64e1c11 (patch) | |
tree | 744d349b8a88eb40eb2c3f4e25f16e39dd886efb | |
parent | a3b969cb1bb1fddecbab46dad5c4a0da516fb25e (diff) | |
download | kubernetes-kafka-41938168dc6312439de842e649ce1a13b64e1c11.tar.gz kubernetes-kafka-41938168dc6312439de842e649ce1a13b64e1c11.tar.bz2 kubernetes-kafka-41938168dc6312439de842e649ce1a13b64e1c11.zip |
not working
-rw-r--r-- | test/basic-with-kafkacat.yml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/test/basic-with-kafkacat.yml b/test/basic-with-kafkacat.yml index 9025f20..ca750ac 100644 --- a/test/basic-with-kafkacat.yml +++ b/test/basic-with-kafkacat.yml @@ -9,6 +9,11 @@ data: setup.sh: |- touch /tmp/testlog + touch /tmp/produce + tail -f /tmp/produce | kafkacat -P -b $BOOTSTRAP -t test-basic-with-kafkacat -v > /tmp/producer.out 2> /tmp/producer.err & + + kafkacat -C -b $BOOTSTRAP -t test-basic-with-kafkacat -q -f '[%p,%o] %s\n' > /tmp/consumer.out 2> /tmp/consumer.err & + tail -f /tmp/testlog test.sh: |- @@ -16,9 +21,19 @@ data: exec 2>&1 unique=$(date -Ins) + echo "Test $unique" >> /tmp/produce + sleep 1 + LAST=$(tail -n 1 /tmp/consumer.out | tee -a /tmp/testlog) - echo "Test $unique" | kafkacat -P -b $BOOTSTRAP -t test-basic-with-kafkacat -v - kafkacat -C -b $BOOTSTRAP -t test-basic-with-kafkacat -o -1 -e | grep $unique + [ "$LAST" == *"$unique" ] || { + echo "Last message '$LAST' doesn't contain marker '$unique'" + #kafkacat -C -b $BOOTSTRAP -t test-basic-with-kafkacat -o -1 -e | grep $unique + #echo "Producer output:" + #cat /tmp/producer.out + #echo "Producer err:" + #cat /tmp/producer.err + #exit 1 + } exit 0 |