Skip to content

Commit

Permalink
use the new kafka native container for faster test runs (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
lovromazgon authored Jul 31, 2024
1 parent 607d878 commit 34be835
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 38 deletions.
30 changes: 6 additions & 24 deletions test/docker-compose-kafka.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,14 @@
version: '3.4'
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.0.0
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000

kafka:
image: confluentinc/cp-kafka:7.0.0
volumes:
- ./kafka-test.sh:/kafka-test.sh
image: apache/kafka-native:3.8.0
healthcheck:
test: /kafka-test.sh
# health checks happen every 10s, failures in the first 30s are not counted toward the maximum number of retries,
# after 3 failed health checks the service is marked as unhealthy
interval: 10s
test: ["CMD", "nc", "-z", "localhost", "9092"]
# health checks happen every 2s, failures in the first 30s are not counted toward the maximum number of retries,
# after 5 failed health checks the service is marked as unhealthy
interval: 2s
timeout: 10s
retries: 3
retries: 5
start_period: 30s
depends_on:
- zookeeper
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
9 changes: 0 additions & 9 deletions test/docker-compose-redpanda.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
version: '3.7'
networks:
redpanda_network:
driver: bridge
volumes:
redpanda: null
services:
redpanda:
image: docker.redpanda.com/redpandadata/redpanda:v23.1.4
Expand All @@ -18,7 +13,3 @@ services:
ports:
- 9092:9092
- 29092:29092
volumes:
- redpanda:/var/lib/redpanda/data
networks:
- redpanda_network
5 changes: 0 additions & 5 deletions test/kafka-test.sh

This file was deleted.

0 comments on commit 34be835

Please sign in to comment.