summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Volkov <av903u@att.com>2018-10-02 09:10:06 -0700
committerAndrey Volkov <av903u@att.com>2018-10-02 09:23:45 -0700
commit38634f1aa6c9c6c60d7c94bde7ef743b4b6915af (patch)
tree2f0d7de768d72eb1e496265ab0284ca3ab8a1b83
parentd734925bb6d80bb0fd3970641d7be08a70f1a453 (diff)
Improve test stability
See false positive in I234a50e9b2e46d5c92a89eb8073771043b4eaf56. This patch makes the following changes to improve gate stability: - Increase timeout while waiting for container logs from 30 to 60. - Exclude terminating containers and get container name on each iteration. NAME READY STATUS RESTARTS AGE divingbell-apparmor-default-984mc 0/1 Terminating 0 26s divingbell-apparmor-default-splhc 0/1 ContainerCreating 0 8s divingbell-ethtool-default-62dlt 0/1 ContainerCreating 0 8s divingbell-ethtool-default-v975n 0/1 Terminating 0 26s divingbell-mounts-default-2xhv5 0/1 ContainerCreating 0 8s divingbell-sysctl-default-c8nhn 0/1 Pending 0 8s divingbell-sysctl-default-mlsnp 0/1 Terminating 0 26s divingbell-uamlite-default-dv9cv 0/1 Pending 0 8s Change-Id: I35ba6844d41c92bf9f581a97218275363e9ee0bd
Notes
Notes (review): Code-Review+1: Craig Anderson <craig.anderson@att.com> Code-Review+2: Felipe Monteiro <felipe.monteiro@att.com> Code-Review+1: Drew Walters <drewwalters96@gmail.com> Code-Review+1: Dan Crank <dan.no@att.com> Code-Review+2: Pete Birley <petebirley@gmail.com> Workflow+1: Pete Birley <petebirley@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 04 Oct 2018 17:57:30 +0000 Reviewed-on: https://review.openstack.org/607309 Project: openstack/airship-divingbell Branch: refs/heads/master
-rwxr-xr-xtools/gate/scripts/020-test-divingbell.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/gate/scripts/020-test-divingbell.sh b/tools/gate/scripts/020-test-divingbell.sh
index 22c3347..d17d69d 100755
--- a/tools/gate/scripts/020-test-divingbell.sh
+++ b/tools/gate/scripts/020-test-divingbell.sh
@@ -151,11 +151,11 @@ dry_run(){
151 151
152get_container_status(){ 152get_container_status(){
153 local deployment="${1}" 153 local deployment="${1}"
154 container="$(kubectl get pods --namespace="${NAME}" | grep ${NAME}-${deployment} | cut -d' ' -f1)" 154 local log_connect_timeout=60
155 local log_connect_timeout=30
156 local log_connect_sleep_interval=2 155 local log_connect_sleep_interval=2
157 local wait_time=0 156 local wait_time=0
158 while : ; do 157 while : ; do
158 container="$(kubectl get pods --namespace="${NAME}" | grep ${NAME}-${deployment} | grep -v Terminating | cut -d' ' -f1)"
159 kubectl logs "${container}" --namespace="${NAME}" > /dev/null && break || \ 159 kubectl logs "${container}" --namespace="${NAME}" > /dev/null && break || \
160 echo "Waiting for container logs..." && \ 160 echo "Waiting for container logs..." && \
161 wait_time=$((${wait_time} + ${log_connect_sleep_interval})) && \ 161 wait_time=$((${wait_time} + ${log_connect_sleep_interval})) && \
@@ -987,4 +987,3 @@ test_overrides
987init_default_state 987init_default_state
988 988
989echo "All tests pass for ${NAME}" 989echo "All tests pass for ${NAME}"
990