diff options
author | Staffan Olsson <staffan@repos.se> | 2017-11-05 21:15:09 +0100 |
---|---|---|
committer | Staffan Olsson <staffan@repos.se> | 2017-11-09 13:54:40 +0100 |
commit | 96a3adc570e5a2ec5a18de6bd7e17e9790a36d97 (patch) | |
tree | 3b46b41662432633223be01e93f2ba8389656d93 /test/basic-produce-consume.yml | |
parent | dbf77898c4e6c1617fa7b8ec28347072ec86ec0f (diff) | |
download | kubernetes-kafka-96a3adc570e5a2ec5a18de6bd7e17e9790a36d97.tar.gz kubernetes-kafka-96a3adc570e5a2ec5a18de6bd7e17e9790a36d97.tar.bz2 kubernetes-kafka-96a3adc570e5a2ec5a18de6bd7e17e9790a36d97.zip |
Converts (console-) produce-consume test to online ...
style like kafkacat, but without the timestamp diff feature
because I couldn't get message timestamp out of the console consumer.
Also I had to increase PC_WAIT.
Diffstat (limited to 'test/basic-produce-consume.yml')
-rw-r--r-- | test/basic-produce-consume.yml | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/test/basic-produce-consume.yml b/test/basic-produce-consume.yml deleted file mode 100644 index 32ec4ec..0000000 --- a/test/basic-produce-consume.yml +++ /dev/null @@ -1,113 +0,0 @@ ---- -kind: ConfigMap -metadata: - name: basic-produce-consume - namespace: test-kafka -apiVersion: v1 -data: - - setup.sh: |- - touch /tmp/testlog - - ./bin/kafka-topics.sh --zookeeper $ZOOKEEPER \ - --create --if-not-exists --topic test-basic-produce-consume \ - --partitions 1 --replication-factor 1 - - # Despite the deprecation warning --zookeeper nothing is consumed when using --bootstrap-server - ./bin/kafka-console-consumer.sh --zookeeper $ZOOKEEPER --topic test-basic-produce-consume > /tmp/testconsumed & - - tail -f /tmp/testlog - - continue.sh: |- - exit 0 - - run.sh: |- - exec >> /tmp/testlog - exec 2>&1 - - unique=$(date -Ins) - - echo "Test $unique" | ./bin/kafka-console-producer.sh --broker-list $BOOTSTRAP --topic test-basic-produce-consume - echo "" - tail -n 1 /tmp/testconsumed | grep $unique - - # How to make this test fail: - #apt-get update && apt-get install -y --no-install-recommends procps - #pkill java - - exit 0 ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: basic-produce-consume - namespace: test-kafka -spec: - template: - spec: - containers: - - name: topic-create - image: solsson/kafka:1.0.0@sha256:17fdf1637426f45c93c65826670542e36b9f3394ede1cb61885c6a4befa8f72d - command: - - ./bin/kafka-topics.sh - - --zookeeper - - zookeeper.kafka.svc.cluster.local:2181 - - --create - - --if-not-exists - - --topic - - test-basic-produce-consume - - --partitions - - "1" - - --replication-factor - - "2" - restartPolicy: Never ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - name: basic-produce-consume - namespace: test-kafka -spec: - replicas: 1 - template: - metadata: - labels: - test-target: kafka - test-type: readiness - spec: - containers: - - name: testcase - image: solsson/kafka:1.0.0@sha256:17fdf1637426f45c93c65826670542e36b9f3394ede1cb61885c6a4befa8f72d - env: - - name: BOOTSTRAP - value: kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092 - - name: ZOOKEEPER - value: zookeeper.kafka.svc.cluster.local:2181 - # Test set up - command: - - /bin/bash - - -e - - /test/setup.sh - # Test run, again and again - readinessProbe: - exec: - command: - - /bin/bash - - -e - - /test/run.sh - # JVM start is slow, can we keep producer started and restore the default preriod 10s? - periodSeconds: 30 - # Test quit on nonzero exit - livenessProbe: - exec: - command: - - /bin/bash - - -e - - /test/continue.sh - volumeMounts: - - name: config - mountPath: /test - volumes: - - name: config - configMap: - name: basic-produce-consume |