1 Star 0 Fork 43

yoo/iSulad

forked from src-openEuler/iSulad 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0003-fix-health_check.sh.patch 2.27 KB
一键复制 编辑 原始数据 按行查看 历史
zhongtao 提交于 2023-05-24 16:52 . upgrade from upstream
From 5bfde56d1130572e9bf76dd0fc40a5f0a34923d2 Mon Sep 17 00:00:00 2001
From: zhongtao <[email protected]>
Date: Sun, 14 May 2023 14:02:48 +0800
Subject: [PATCH 3/9] fix health_check.sh
Signed-off-by: zhongtao <[email protected]>
---
CI/test_cases/container_cases/health_check.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/CI/test_cases/container_cases/health_check.sh b/CI/test_cases/container_cases/health_check.sh
index 621574cd..1542bd09 100755
--- a/CI/test_cases/container_cases/health_check.sh
+++ b/CI/test_cases/container_cases/health_check.sh
@@ -103,7 +103,7 @@ function test_health_check_normally()
[[ $(isula inspect -f '{{.State.Health.Status}}' ${container_name}) == "healthy" ]]
[[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - incorrent container health check status: not healthy" && ((ret++))
- kill -9 $(isula inspect -f '{{.State.Pid}}' ${container_name}) && sleep 1 # Wait for the container to be killed
+ kill -9 $(isula inspect -f '{{.State.Pid}}' ${container_name}) && sleep 2 # Wait for the container to be killed
# The container process exits abnormally and the health check status becomes unhealthy
[[ $(isula inspect -f '{{.State.Health.Status}}' ${container_name}) == "unhealthy" ]]
@@ -139,13 +139,13 @@ function test_health_check_timeout()
[[ $(isula inspect -f '{{.State.Status}}' ${container_name}) == "running" ]]
[[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - incorrent container status: not running" && ((ret++))
- sleep 1 # Health check has been performed yet
+ sleep 2 # Health check has been performed yet
# Initial status when the container is still starting
[[ $(isula inspect -f '{{.State.Health.Status}}' ${container_name}) == "starting" ]]
[[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - incorrent container health check status: not starting" && ((ret++))
- sleep 7 # finish first health check
+ sleep 10 # finish first health check
# The container process exits and the health check status becomes unhealthy
[[ $(isula inspect -f '{{.State.Health.Status}}' ${container_name}) == "unhealthy" ]]
[[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - incorrent container health check status: not unhealthy" && ((ret++))
--
2.40.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mdLUbG/iSulad.git
[email protected]:mdLUbG/iSulad.git
mdLUbG
iSulad
iSulad
master

搜索帮助