Skip to content

Commit 3fad8bf

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 14ec1ad commit 3fad8bf

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
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/v1beta1
4266
kind: Deployment

test/basic-with-kafkacat.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ data:
2323
kafkacat -C -b $BOOTSTRAP -t test-basic-with-kafkacat -o -1 -e | grep $unique
2424
2525
exit 0
26-
2726
---
2827
apiVersion: batch/v1
2928
kind: Job
@@ -47,7 +46,7 @@ spec:
4746
- --partitions
4847
- "1"
4948
- --replication-factor
50-
- "1"
49+
- "2"
5150
restartPolicy: Never
5251
---
5352
apiVersion: apps/v1beta1

0 commit comments

Comments
 (0)