Skip to content

Commit b8bfda8

Browse files
committed
Changes replication-factor for test topics to 2 ...
because 1 is useless, as even a normal reschedule of the broker pod that happens to own the replica+partition will disrupt clients. Testing with replication-factor=2 but using 3 for production topics is sensible because we can test with 3 brokers how replication performs.
1 parent 96641a0 commit b8bfda8

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

test/basic-produce-consume.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,31 @@ data:
3636
#pkill java
3737
3838
exit 0
39-
39+
---
40+
apiVersion: batch/v1
41+
kind: Job
42+
metadata:
43+
name: basic-produce-consume
44+
namespace: test-kafka
45+
spec:
46+
template:
47+
spec:
48+
containers:
49+
- name: topic-create
50+
image: solsson/kafka:1.0.0@sha256:17fdf1637426f45c93c65826670542e36b9f3394ede1cb61885c6a4befa8f72d
51+
command:
52+
- ./bin/kafka-topics.sh
53+
- --zookeeper
54+
- zookeeper.kafka.svc.cluster.local:2181
55+
- --create
56+
- --if-not-exists
57+
- --topic
58+
- test-basic-produce-consume
59+
- --partitions
60+
- "1"
61+
- --replication-factor
62+
- "2"
63+
restartPolicy: Never
4064
---
4165
apiVersion: apps/v1beta2
4266
kind: Deployment

test/basic-with-kafkacat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ spec:
8282
- --partitions
8383
- "1"
8484
- --replication-factor
85-
- "1"
85+
- "2"
8686
restartPolicy: Never
8787
---
8888
apiVersion: apps/v1beta2

0 commit comments

Comments
 (0)