diff --git a/.github/workflows/unit-integration-tests.yml b/.github/workflows/unit-integration-tests.yml index 5642870623..5b2fb5cdd6 100644 --- a/.github/workflows/unit-integration-tests.yml +++ b/.github/workflows/unit-integration-tests.yml @@ -160,19 +160,23 @@ jobs: ports: - 11211:11211 zookeeper: - image: bitnami/zookeeper:latest + image: confluentinc/cp-zookeeper:latest env: - ALLOW_ANONYMOUS_LOGIN: "yes" + ZOOKEEPER_CLIENT_PORT: "2181" + ZOOKEEPER_TICK_TIME: "2000" ports: - 2181:2181 kafka: - image: wurstmeister/kafka:2.13-2.8.1 + image: confluentinc/cp-kafka:latest env: - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092 - KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092 - KAFKA_CREATE_TOPICS: gotest:1:1,gosegtest:1:1 - KAFKA_BROKER_ID: 1 + KAFKA_BROKER_ID: "1" + KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181" + KAFKA_LISTENERS: "PLAINTEXT://0.0.0.0:9092" + KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://localhost:9092" + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "PLAINTEXT:PLAINTEXT" + KAFKA_INTER_BROKER_LISTENER_NAME: "PLAINTEXT" + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1" + KAFKA_GROUP_ID: "gotest" ports: - 9092:9092 localstack: diff --git a/contrib/confluentinc/confluent-kafka-go/kafka.v2/kafka_test.go b/contrib/confluentinc/confluent-kafka-go/kafka.v2/kafka_test.go index 8efa05fc58..bc33c09ad9 100644 --- a/contrib/confluentinc/confluent-kafka-go/kafka.v2/kafka_test.go +++ b/contrib/confluentinc/confluent-kafka-go/kafka.v2/kafka_test.go @@ -179,30 +179,6 @@ func TestConsumerChannel(t *testing.T) { } } -/* -to run the integration test locally: - - docker network create confluent - - docker run --rm \ - --name zookeeper \ - --network confluent \ - -p 2181:2181 \ - -e ZOOKEEPER_CLIENT_PORT=2181 \ - confluentinc/cp-zookeeper:5.0.0 - - docker run --rm \ - --name kafka \ - --network confluent \ - -p 9092:9092 \ - -e KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 \ - -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092 \ - -e KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092 \ - -e KAFKA_CREATE_TOPICS=gotest:1:1 \ - -e KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 \ - confluentinc/cp-kafka:5.0.0 -*/ - func TestConsumerFunctional(t *testing.T) { for _, tt := range []struct { name string diff --git a/docker-compose.yaml b/docker-compose.yaml index 2927629b6a..4ded373fc5 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,3 @@ -version: "3.3" # optional since v1.27.0 services: cassandra: image: cassandra:3.7 @@ -111,20 +110,23 @@ services: ports: - "11211:11211" zookeeper: - image: bitnami/zookeeper:latest + image: confluentinc/cp-zookeeper:latest environment: - ALLOW_ANONYMOUS_LOGIN: "yes" + ZOOKEEPER_CLIENT_PORT: "2181" + ZOOKEEPER_TICK_TIME: "2000" ports: - "2181:2181" - kafka2: - image: wurstmeister/kafka:2.13-2.8.1 + kafka: + image: confluentinc/cp-kafka:latest environment: - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092 - KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092 - #KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT,LISTENER_NAME:PLAINTEXT - KAFKA_CREATE_TOPICS: gotest:1:1,gosegtest:1:1 - KAFKA_BROKER_ID: 1 + KAFKA_BROKER_ID: "1" + KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181" + KAFKA_LISTENERS: "PLAINTEXT://0.0.0.0:9092" + KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://localhost:9092" + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "PLAINTEXT:PLAINTEXT" + KAFKA_INTER_BROKER_LISTENER_NAME: "PLAINTEXT" + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1" + KAFKA_GROUP_ID: "gotest" depends_on: - zookeeper ports: