This is an automated email from the ASF dual-hosted git repository.

zhaojinchao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new c29c4be70b4 Make Proxy run as PID 1 in E2E container (#28115)
c29c4be70b4 is described below

commit c29c4be70b446ce2a056cee6abd11b947f7fa943
Author: 吴伟杰 <[email protected]>
AuthorDate: Wed Aug 16 14:23:11 2023 +0800

    Make Proxy run as PID 1 in E2E container (#28115)
---
 test/e2e/fixture/Dockerfile                     | 6 +-----
 test/e2e/fixture/src/test/assembly/bin/start.sh | 5 +----
 test/e2e/fixture/src/test/assembly/bin/stop.sh  | 0
 3 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/test/e2e/fixture/Dockerfile b/test/e2e/fixture/Dockerfile
index c521b6c1ec1..1a03bec97a3 100644
--- a/test/e2e/fixture/Dockerfile
+++ b/test/e2e/fixture/Dockerfile
@@ -23,10 +23,6 @@ RUN mv /opt/${APP_NAME} /opt/shardingsphere-proxy
 
 WORKDIR /opt/shardingsphere-proxy
 
-RUN cat bin/start.sh | tr -d '\r' > _start.sh && mv _start.sh bin/start.sh
-RUN cat bin/stop.sh | tr -d '\r' > _stop.sh && mv _stop.sh bin/stop.sh
-RUN chmod +x -R ./bin
-
 FROM eclipse-temurin:8-jdk
 
 COPY --from=prepare /opt/shardingsphere-proxy /opt/shardingsphere-proxy
@@ -34,4 +30,4 @@ COPY --from=prepare /opt/shardingsphere-proxy 
/opt/shardingsphere-proxy
 EXPOSE 3307
 EXPOSE 3308
 
-CMD /opt/shardingsphere-proxy/bin/start.sh && tail -f 
/opt/shardingsphere-proxy/logs/stdout.log
+CMD /opt/shardingsphere-proxy/bin/start.sh
diff --git a/test/e2e/fixture/src/test/assembly/bin/start.sh 
b/test/e2e/fixture/src/test/assembly/bin/start.sh
old mode 100644
new mode 100755
index e5d03c626e9..a1cb85fc0bb
--- a/test/e2e/fixture/src/test/assembly/bin/start.sh
+++ b/test/e2e/fixture/src/test/assembly/bin/start.sh
@@ -27,7 +27,6 @@ if [ ! -d ${LOGS_DIR} ]; then
     mkdir ${LOGS_DIR}
 fi
 
-STDOUT_FILE=${LOGS_DIR}/stdout.log
 EXT_LIB=${DEPLOY_DIR}/ext-lib
 
 CLASS_PATH=.:${DEPLOY_DIR}/lib/*:${EXT_LIB}/*
@@ -70,6 +69,4 @@ fi
 
 echo "The classpath is ${CLASS_PATH}"
 
-nohup java ${JAVA_OPTS} ${JAVA_MEM_OPTS} -classpath ${CLASS_PATH} 
${MAIN_CLASS} >> ${STDOUT_FILE} 2>&1 &
-sleep 1
-echo "Please check the STDOUT file: $STDOUT_FILE"
+exec java ${JAVA_OPTS} ${JAVA_MEM_OPTS} -classpath ${CLASS_PATH} ${MAIN_CLASS}
diff --git a/test/e2e/fixture/src/test/assembly/bin/stop.sh 
b/test/e2e/fixture/src/test/assembly/bin/stop.sh
old mode 100644
new mode 100755

Reply via email to