@@ -1917,7 +1917,7 @@ function verify_domain_created {
19171917 fi
19181918}
19191919
1920- function verify_service_and_pod_deleted {
1920+ function verify_pod_deleted {
19211921 if [ " $# " != 2 ] ; then
19221922 fail " requires 2 parameters: domainkey serverNum, set serverNum to 0 to indicate the admin server"
19231923 fi
@@ -1934,27 +1934,9 @@ function verify_service_and_pod_deleted {
19341934 local POD_NAME=" ${DOMAIN_UID} -${MS_BASE_NAME}${SERVER_NUM} "
19351935 fi
19361936
1937- local SERVICE_NAME=" ${POD_NAME} "
1938-
19391937 local max_count_srv=50
19401938 local max_count_pod=50
19411939 local wait_time=10
1942- local count=0
1943- local srv_count=1
1944-
1945- trace " checking if service $SERVICE_NAME is deleted"
1946- while [ " ${srv_count:= Error} " != " 0" -a $count -lt $max_count_srv ] ; do
1947- local count=` expr $count + 1`
1948- local srv_count=` kubectl -n $NAMESPACE get services | grep " ^$SERVICE_NAME " | wc -l`
1949- if [ " ${srv_count:= Error} " != " 0" ]; then
1950- trace " service $SERVICE_NAME still exists, iteration $count of $max_count_srv "
1951- sleep $wait_time
1952- fi
1953- done
1954-
1955- if [ " ${srv_count:= Error} " != " 0" ]; then
1956- fail " ERROR: the service $SERVICE_NAME is not deleted, exiting!"
1957- fi
19581940
19591941 trace " checking if pod $POD_NAME is deleted"
19601942 local pod_count=1
@@ -2001,15 +1983,15 @@ function verify_domain_deleted {
20011983 fail " ERROR: domain still exists, exiting!"
20021984 fi
20031985
2004- trace " verify the service and pod of admin server is deleted"
2005- verify_service_and_pod_deleted $DOM_KEY 0
1986+ trace " verify the pod of admin server is deleted"
1987+ verify_pod_deleted $DOM_KEY 0
20061988
20071989 trace " verify $MS_NUM number of managed servers for deletion"
20081990 local i
20091991 for i in $( seq 1 $MS_NUM ) ;
20101992 do
2011- trace " verify service and pod of managed server $i is deleted"
2012- verify_service_and_pod_deleted $DOM_KEY $i
1993+ trace " verify pod of managed server $i is deleted"
1994+ verify_pod_deleted $DOM_KEY $i
20131995 done
20141996 trace Done. Verified.
20151997}
@@ -2241,7 +2223,7 @@ function test_cluster_scale {
22412223 sed -i -e " 0,/replicas:/s/replicas:.*/replicas: 2/" $domainCR
22422224 kubectl apply -f $domainCR
22432225
2244- verify_service_and_pod_deleted $DOM_KEY 3
2226+ verify_pod_deleted $DOM_KEY 3
22452227 verify_webapp_load_balancing $DOM_KEY 2
22462228
22472229 # verify that scaling $DOM_KEY had no effect on another domain
0 commit comments