Skip to content

Commit 7df41e2

Browse files
committed
Updates test commands for nopetset
1 parent 5e6eece commit 7df41e2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

test/test.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ kubectl exec -ti testclient -- ./bin/kafka-console-consumer.sh --zookeeper zooke
1010

1111
# Go ahead and produce messages
1212
echo "Write a message followed by enter, exit using Ctrl+C"
13-
kubectl exec -ti testclient -- ./bin/kafka-console-producer.sh --broker-list kafka-0.broker.kafka.svc.cluster.local:9092 --topic test1
13+
kubectl exec -ti testclient -- ./bin/kafka-console-producer.sh --broker-list broker-0.kafka.svc.cluster.local:9092 --topic test1
1414

15-
# Bootstrap even if two nodes are down (shorter name requires same namespace)
16-
kubectl exec -ti testclient -- ./bin/kafka-console-producer.sh --broker-list kafka-0.broker:9092,kafka-1.broker:9092,kafka-2.broker:9092 --topic test1
15+
# Bootstrap even if two nodes are down
16+
kubectl exec -ti testclient -- ./bin/kafka-console-producer.sh --broker-list broker-0.kafka.svc.cluster.local:9092,broker-1.kafka.svc.cluster.local:9092,broker-2.kafka.svc.cluster.local:9092 --topic test1
17+
18+
# Get a broker through the service
19+
kubectl exec -ti testclient -- ./bin/kafka-console-producer.sh --broker-list kafka.kafka.svc.cluster.local:9092 --topic test1
1720

1821
# The following commands run in the pod
1922
kubectl exec -ti testclient -- /bin/bash
@@ -22,13 +25,13 @@ kubectl exec -ti testclient -- /bin/bash
2225
./bin/kafka-topics.sh --zookeeper zookeeper:2181 --describe --topic test2
2326

2427
./bin/kafka-verifiable-consumer.sh \
25-
--broker-list=kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092 \
28+
--broker-list=kafka.kafka.svc.cluster.local:9092 \
2629
--topic=test2 --group-id=A --verbose
2730

2831
# If a topic isn't available this producer will tell you
2932
# WARN Error while fetching metadata with correlation id X : {topicname=LEADER_NOT_AVAILABLE}
3033
# ... but with current config Kafka will auto-create the topic
3134
./bin/kafka-verifiable-producer.sh \
32-
--broker-list=kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092 \
35+
--broker-list=kafka.kafka.svc.cluster.local:9092 \
3336
--value-prefix=1 --topic=test2 \
3437
--acks=1 --throughput=1 --max-messages=10

0 commit comments

Comments
 (0)