You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2022/10/25 04:38:16 UTC
[iotdb-client-go] branch main updated: Use 1c1d docker to run go client IT (#55)
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iotdb-client-go.git
The following commit(s) were added to refs/heads/main by this push:
new 6b079e5 Use 1c1d docker to run go client IT (#55)
6b079e5 is described below
commit 6b079e5a47f42f3ecccf1ae4f35d6d6043e7c49d
Author: Haonan <hh...@outlook.com>
AuthorDate: Tue Oct 25 12:38:11 2022 +0800
Use 1c1d docker to run go client IT (#55)
---
Makefile | 8 +++++---
test/e2e/Dockerfile.iotdb-server | 3 ++-
test/e2e/docker-compose.yml | 2 +-
test/e2e/{Dockerfile.iotdb-server => start-1c1d.sh} | 14 +++++---------
4 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/Makefile b/Makefile
index 461311f..727bb10 100644
--- a/Makefile
+++ b/Makefile
@@ -48,9 +48,10 @@ test:
go test -v ./client/...
e2e_test:
- sh -c "cd /tmp/ && rm -rf iotdb && git clone https://github.com/apache/iotdb.git && cd iotdb && mvn -Dmaven.test.skip=true package -am -pl server"
+ sh -c "cd /tmp/ && rm -rf iotdb && git clone https://github.com/apache/iotdb.git && cd iotdb && mvn clean package -pl distribution -am -DskipTests"
mkdir -p target/iotdb
- unzip -o -q /tmp/iotdb/server/target/iotdb-server-*.zip -d target/iotdb
+ unzip -o -q /tmp/iotdb/distribution/target/apache-iotdb-*-all-bin.zip -d target
+ mv target/*/* target/iotdb
docker-compose -f test/e2e/docker-compose.yml up --build --abort-on-container-exit --remove-orphans
e2e_test_clean:
@@ -60,7 +61,8 @@ e2e_test_clean:
#only used for project structure that the iotdb main project is in the parent folder of this project.
e2e_test_for_parent_git_repo:
mkdir -p target/iotdb
- unzip -o -q ../server/target/iotdb-server-*.zip -d target/iotdb
+ unzip -o -q ../distribution/target/apache-iotdb-*-all-bin.zip -d target
+ mv target/*/* target/iotdb
docker-compose -f test/e2e/docker-compose.yml up --build --abort-on-container-exit --remove-orphans
e2e_test_clean_for_parent_git_repo:
diff --git a/test/e2e/Dockerfile.iotdb-server b/test/e2e/Dockerfile.iotdb-server
index 4d6a8ab..4fbd70a 100644
--- a/test/e2e/Dockerfile.iotdb-server
+++ b/test/e2e/Dockerfile.iotdb-server
@@ -22,6 +22,7 @@ FROM openjdk:11-jre-slim
RUN apt update \
&& apt install -y procps && apt clean
ADD target /usr/local
+ADD test/e2e/start-1c1d.sh /
WORKDIR /usr/local/iotdb
EXPOSE 6667
-CMD [ "/usr/local/iotdb/sbin/start-server.sh" ]
+CMD ["/start-1c1d.sh"]
diff --git a/test/e2e/docker-compose.yml b/test/e2e/docker-compose.yml
index a2cb793..7a27713 100644
--- a/test/e2e/docker-compose.yml
+++ b/test/e2e/docker-compose.yml
@@ -29,7 +29,7 @@ services:
healthcheck:
test: ["CMD", "ls", "/usr/local/iotdb/data"]
interval: 3s
- timeout: 5s
+ timeout: 15s
retries: 30
start_period: 30s
iotdb_client_go:
diff --git a/test/e2e/Dockerfile.iotdb-server b/test/e2e/start-1c1d.sh
old mode 100644
new mode 100755
similarity index 80%
copy from test/e2e/Dockerfile.iotdb-server
copy to test/e2e/start-1c1d.sh
index 4d6a8ab..e1cc035
--- a/test/e2e/Dockerfile.iotdb-server
+++ b/test/e2e/start-1c1d.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -16,12 +17,7 @@
# specific language governing permissions and limitations
# under the License.
#
-
-FROM openjdk:11-jre-slim
-
-RUN apt update \
- && apt install -y procps && apt clean
-ADD target /usr/local
-WORKDIR /usr/local/iotdb
-EXPOSE 6667
-CMD [ "/usr/local/iotdb/sbin/start-server.sh" ]
+nohup /usr/local/iotdb/sbin/start-confignode.sh > /dev/null 2>&1 &
+sleep 5
+ls /usr/local/iotdb/sbin
+/usr/local/iotdb/sbin/start-datanode.sh