Skip to content

Commit

Permalink
test(e2e): remove -it options from docker command
Browse files Browse the repository at this point in the history
  • Loading branch information
hengyoush committed Jan 12, 2025
1 parent 81f6ace commit 7722228
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions testdata/test_kafka.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ function test_kafka_client() {
KAFKA_PORT=9092
cid=$(docker run -d -p ${KAFKA_PORT}:${KAFKA_PORT} ${IMAGE_NAME})
sleep 20
docker exec -it $cid bash -c "/opt/kafka/bin/kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:${KAFKA_PORT}"
docker exec $cid bash -c "/opt/kafka/bin/kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:${KAFKA_PORT}"
timeout 30 ${CMD} watch --debug-output kafka --remote-ports ${KAFKA_PORT} 2>&1 | tee "${CLIENT_LNAME}" &
echo "Sending test messages..."
sleep 10
docker exec -it $cid bash -c "cat /opt/kafka/bin/kafka-console-producer.sh | /opt/kafka/bin/kafka-console-producer.sh --topic quickstart-events --bootstrap-server localhost:${KAFKA_PORT}"
docker exec $cid bash -c "cat /opt/kafka/bin/kafka-console-producer.sh | /opt/kafka/bin/kafka-console-producer.sh --topic quickstart-events --bootstrap-server localhost:${KAFKA_PORT}"
sleep 5
docker rm -f $cid || true
wait
Expand All @@ -47,11 +47,11 @@ function test_kafka_server() {
KAFKA_PORT=9092
cid=$(docker run -d -p ${KAFKA_PORT}:${KAFKA_PORT} ${IMAGE_NAME})
sleep 20
docker exec -it $cid bash -c "/opt/kafka/bin/kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:${KAFKA_PORT}"
docker exec $cid bash -c "/opt/kafka/bin/kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:${KAFKA_PORT}"
timeout 30 ${CMD} watch --debug-output kafka --local-ports ${KAFKA_PORT} 2>&1 | tee "${SERVER_LNAME}" &
echo "Sending test messages..."
sleep 10
docker exec -it $cid bash -c "cat /opt/kafka/bin/kafka-console-producer.sh | /opt/kafka/bin/kafka-console-producer.sh --topic quickstart-events --bootstrap-server localhost:${KAFKA_PORT}"
docker exec $cid bash -c "cat /opt/kafka/bin/kafka-console-producer.sh | /opt/kafka/bin/kafka-console-producer.sh --topic quickstart-events --bootstrap-server localhost:${KAFKA_PORT}"
sleep 5
docker rm -f $cid || true
wait
Expand All @@ -62,7 +62,7 @@ function test_kafka_server() {

function main() {
test_kafka_server
# test_kafka_client
test_kafka_client
}

main

0 comments on commit 7722228

Please sign in to comment.