Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mantzas committed Mar 16, 2024
1 parent 14eba23 commit 5e67378
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 20 deletions.
2 changes: 1 addition & 1 deletion client/kafka/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (
clientTopic = "clientTopic"
)

var brokers = []string{"127.0.0.1:9093"}
var brokers = []string{"127.0.0.1:9092"}

func TestNewAsyncProducer_Success(t *testing.T) {
saramaCfg, err := DefaultProducerSaramaConfig("test-producer", true)
Expand Down
2 changes: 1 addition & 1 deletion component/async/kafka/group/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (
successTopic1 = "successTopic1"
failAllRetriesTopic1 = "failAllRetriesTopic1"
failAndRetryTopic1 = "failAndRetryTopic1"
broker = "127.0.0.1:9093"
broker = "127.0.0.1:9092"
)

func TestGroupConsume(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion component/async/kafka/simple/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
simpleTopic5 = "simpleTopic5"
simpleTopic6 = "simpleTopic6"
simpleTopic7 = "simpleTopic7"
broker = "127.0.0.1:9093"
broker = "127.0.0.1:9092"
)

func TestSimpleConsume(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion component/kafka/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
successTopic2 = "successTopic2"
failAllRetriesTopic2 = "failAllRetriesTopic2"
failAndRetryTopic2 = "failAndRetryTopic2"
broker = "127.0.0.1:9093"
broker = "127.0.0.1:9092"
groupSuffix = "-group"
)

Expand Down
38 changes: 22 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
services:
zookeeper:
image: bitnami/zookeeper:latest
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: bitnami/kafka:3
image: confluentinc/cp-kafka:7.6.0
hostname: broker
container_name: broker
ports:
- "9092:9092"
- "9093:9093"
- "9101:9101"
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9093
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9092,EXTERNAL://localhost:9093
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT
depends_on:
- zookeeper
KAFKA_NODE_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_JMX_PORT: 9101
KAFKA_JMX_HOSTNAME: localhost
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@broker:29093'
KAFKA_LISTENERS: 'PLAINTEXT://broker:29092,CONTROLLER://broker:29093,PLAINTEXT_HOST://0.0.0.0:9092'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_LOG_DIRS: '/tmp/kraft-combined-logs'
# Replace CLUSTER_ID with a unique base64 UUID using "bin/kafka-storage.sh random-uuid"
# See https://docs.confluent.io/kafka/operations-tools/kafka-tools.html#kafka-storage-sh
CLUSTER_ID: 'MkU3OEVBNTcwNTJENDM2Qk'
rabbitmq:
image: docker.io/bitnami/rabbitmq:3.12
ports:
Expand Down

0 comments on commit 5e67378

Please sign in to comment.