You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ew...@apache.org on 2017/02/28 20:21:57 UTC
kafka git commit: KAFKA-4809: docker/run_tests.sh should set up
/opt/kafka-dev to be the source directory
Repository: kafka
Updated Branches:
refs/heads/trunk 8e6fbe8fe -> f3fab2e47
KAFKA-4809: docker/run_tests.sh should set up /opt/kafka-dev to be the source directory
\u20260.x and not 0.8
Author: Colin P. Mccabe <cm...@confluent.io>
Reviewers: Ewen Cheslack-Postava <ew...@confluent.io>
Closes #2602 from cmccabe/KAFKA-4809
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/f3fab2e4
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/f3fab2e4
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/f3fab2e4
Branch: refs/heads/trunk
Commit: f3fab2e476cf5101ba6ae68e4d61ae9ab957b26c
Parents: 8e6fbe8
Author: Colin P. Mccabe <cm...@confluent.io>
Authored: Tue Feb 28 12:21:46 2017 -0800
Committer: Ewen Cheslack-Postava <me...@ewencp.org>
Committed: Tue Feb 28 12:21:46 2017 -0800
----------------------------------------------------------------------
tests/docker/Dockerfile | 20 +++++++-------------
tests/docker/run_tests.sh | 14 ++------------
.../sanity_checks/test_verifiable_producer.py | 4 +++-
3 files changed, 12 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kafka/blob/f3fab2e4/tests/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile
index 82e2e55..3a3df32 100644
--- a/tests/docker/Dockerfile
+++ b/tests/docker/Dockerfile
@@ -16,22 +16,16 @@
FROM openjdk:8
MAINTAINER Apache Kafka dev@kafka.apache.org
-RUN apt update
-RUN apt install -y unzip wget curl jq coreutils openssh-server net-tools vim openjdk-8-jdk python-pip python-dev libffi-dev libssl-dev
-RUN pip install -U pip
-RUN pip install --upgrade cffi
-RUN pip install ducktape==0.6.0
-
-VOLUME ["/kafka_src"]
-
+VOLUME ["/opt/kafka-dev"]
ENV MIRROR="http://apache.cs.utah.edu/"
-RUN wget -q "${MIRROR}kafka/0.8.2.2/kafka_2.10-0.8.2.2.tgz" -O "/tmp/kafka_2.10-0.8.2.2.tgz" && tar xfz /tmp/kafka_2.10-0.8.2.2.tgz -C /opt && mv "/opt/kafka_2.10-0.8.2.2" "/opt/kafka-0.8.2.2"
-RUN wget -q "${MIRROR}kafka/0.9.0.1/kafka_2.10-0.9.0.1.tgz" -O "/tmp/kafka_2.10-0.9.0.1.tgz" && tar xfz /tmp/kafka_2.10-0.9.0.1.tgz -C /opt && mv "/opt/kafka_2.10-0.9.0.1" "/opt/kafka-0.9.0.1"
-RUN wget -q "${MIRROR}kafka/0.10.0.1/kafka_2.10-0.10.0.1.tgz" -O "/tmp/kafka_2.10-0.10.0.1.tgz" && tar xfz /tmp/kafka_2.10-0.10.0.1.tgz -C /opt && mv "/opt/kafka_2.10-0.10.0.1" "/opt/kafka-0.10.0.1"
-RUN wget -q "${MIRROR}kafka/0.10.1.1/kafka_2.10-0.10.1.1.tgz" -O "/tmp/kafka_2.10-0.10.1.1.tgz" && tar xfz /tmp/kafka_2.10-0.10.1.1.tgz -C /opt && mv "/opt/kafka_2.10-0.10.1.1" "/opt/kafka-0.10.1.1"
-RUN rm /tmp/kafka_*.tgz
ADD ssh /root/.ssh
RUN chmod 600 /root/.ssh/id_rsa
+RUN apt update && apt install -y unzip wget curl jq coreutils openssh-server net-tools vim openjdk-8-jdk python-pip python-dev libffi-dev libssl-dev
+RUN pip install -U pip && pip install --upgrade cffi ducktape==0.6.0
+RUN mkdir -p "/opt/kafka_2.10-0.8.2.2" && curl "${MIRROR}kafka/0.8.2.2/kafka_2.10-0.8.2.2.tgz" | tar xz --strip-components=1 -C "/opt/kafka_2.10-0.8.2.2"
+RUN mkdir -p "/opt/kafka_2.10-0.9.0.1" && curl "${MIRROR}kafka/0.9.0.1/kafka_2.10-0.9.0.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka_2.10-0.9.0.1"
+RUN mkdir -p "/opt/kafka_2.10-0.10.0.1" && curl "${MIRROR}kafka/0.10.0.1/kafka_2.10-0.10.0.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka_2.10-0.10.0.1"
+RUN mkdir -p "/opt/kafka_2.10-0.10.1.1" && curl "${MIRROR}kafka/0.10.1.1/kafka_2.10-0.10.1.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka_2.10-0.10.1.1"
CMD service ssh start && tail -f /dev/null
http://git-wip-us.apache.org/repos/asf/kafka/blob/f3fab2e4/tests/docker/run_tests.sh
----------------------------------------------------------------------
diff --git a/tests/docker/run_tests.sh b/tests/docker/run_tests.sh
index 0e5378a..cc381cc 100755
--- a/tests/docker/run_tests.sh
+++ b/tests/docker/run_tests.sh
@@ -46,7 +46,7 @@ fi
echo "Using kafka image: ${KAFKA_IMAGE}"
docker inspect ${KAFKA_IMAGE}
for i in $(seq -w 1 ${KAFKA_NUM_CONTAINERS}); do
- docker run -d -t --name knode${i} --network knw -v ${KAFKA_SRC}:/kafka_src ${KAFKA_IMAGE}
+ docker run -d -t --name knode${i} --network knw -v ${KAFKA_SRC}:/opt/kafka-dev ${KAFKA_IMAGE}
done
docker info
@@ -55,18 +55,8 @@ docker network inspect knw
for i in $(seq -w 1 ${KAFKA_NUM_CONTAINERS}); do
echo knode${i}
- docker exec knode${i} bash -c "(tar xfz /kafka_src/core/build/distributions/kafka_*SNAPSHOT.tgz -C /opt || echo missing kafka tgz did you build kafka tarball) && mv /opt/kafka*SNAPSHOT /opt/kafka-dev && ls -l /opt"
- docker exec knode01 bash -c "ssh knode$i hostname"
-done
-
-# hack to copy test dependencies
-# this is required for running MiniKDC
-(cd ${KAFKA_SRC} && ./gradlew copyDependantTestLibs)
-for i in $(seq -w 1 ${KAFKA_NUM_CONTAINERS}); do
- echo knode${i}
- docker exec knode${i} bash -c "cp /kafka_src/core/build/dependant-testlibs/* /opt/kafka-dev/libs/"
docker exec knode01 bash -c "ssh knode$i hostname"
done
bash tests/cluster_file_generator.sh > tests/cluster_file.json
-docker exec knode01 bash -c "cd /kafka_src; ducktape ${_DUCKTAPE_OPTIONS} --cluster-file tests/cluster_file.json ${TC_PATHS:-tests/kafkatest/tests}"
+docker exec knode01 bash -c "cd /opt/kafka-dev; ducktape ${_DUCKTAPE_OPTIONS} --cluster-file tests/cluster_file.json ${TC_PATHS:-tests/kafkatest/tests}"
http://git-wip-us.apache.org/repos/asf/kafka/blob/f3fab2e4/tests/kafkatest/sanity_checks/test_verifiable_producer.py
----------------------------------------------------------------------
diff --git a/tests/kafkatest/sanity_checks/test_verifiable_producer.py b/tests/kafkatest/sanity_checks/test_verifiable_producer.py
index b4ca4e9..be10574 100644
--- a/tests/kafkatest/sanity_checks/test_verifiable_producer.py
+++ b/tests/kafkatest/sanity_checks/test_verifiable_producer.py
@@ -23,7 +23,7 @@ from kafkatest.services.kafka import KafkaService
from kafkatest.services.verifiable_producer import VerifiableProducer
from kafkatest.services.zookeeper import ZookeeperService
from kafkatest.utils import is_version
-from kafkatest.version import LATEST_0_8_2, LATEST_0_9, DEV_BRANCH, KafkaVersion
+from kafkatest.version import LATEST_0_8_2, LATEST_0_9, LATEST_0_10_0, LATEST_0_10_1, DEV_BRANCH, KafkaVersion
class TestVerifiableProducer(Test):
@@ -48,6 +48,8 @@ class TestVerifiableProducer(Test):
@cluster(num_nodes=3)
@parametrize(producer_version=str(LATEST_0_8_2))
@parametrize(producer_version=str(LATEST_0_9))
+ @parametrize(producer_version=str(LATEST_0_10_0))
+ @parametrize(producer_version=str(LATEST_0_10_1))
@parametrize(producer_version=str(DEV_BRANCH))
def test_simple_run(self, producer_version=DEV_BRANCH):
"""