@@ -1852,7 +1852,7 @@ function verify_domain_created {
1852
1852
fi
1853
1853
}
1854
1854
1855
- function verify_service_and_pod_deleted {
1855
+ function verify_pod_deleted {
1856
1856
if [ " $# " != 2 ] ; then
1857
1857
fail " requires 2 parameters: domainkey serverNum, set serverNum to 0 to indicate the admin server"
1858
1858
fi
@@ -1869,27 +1869,9 @@ function verify_service_and_pod_deleted {
1869
1869
local POD_NAME=" ${DOMAIN_UID} -${MS_BASE_NAME}${SERVER_NUM} "
1870
1870
fi
1871
1871
1872
- local SERVICE_NAME=" ${POD_NAME} "
1873
-
1874
1872
local max_count_srv=50
1875
1873
local max_count_pod=50
1876
1874
local wait_time=10
1877
- local count=1
1878
- local srv_count=1
1879
-
1880
- trace " checking if service $SERVICE_NAME is deleted"
1881
- while [ " ${srv_count:= Error} " != " 0" -a $count -lt $max_count_srv ] ; do
1882
- local count=` expr $count + 1`
1883
- local srv_count=` kubectl -n $NAMESPACE get services | grep " ^$SERVICE_NAME " | wc -l`
1884
- if [ " ${srv_count:= Error} " != " 0" ]; then
1885
- trace " service $SERVICE_NAME still exists, iteration $count of $max_count_srv "
1886
- sleep $wait_time
1887
- fi
1888
- done
1889
-
1890
- if [ " ${srv_count:= Error} " != " 0" ]; then
1891
- fail " ERROR: the service $SERVICE_NAME is not deleted, exiting!"
1892
- fi
1893
1875
1894
1876
trace " checking if pod $POD_NAME is deleted"
1895
1877
local pod_count=1
@@ -1936,15 +1918,15 @@ function verify_domain_deleted {
1936
1918
fail " ERROR: domain still exists, exiting!"
1937
1919
fi
1938
1920
1939
- trace " verify the service and pod of admin server is deleted"
1940
- verify_service_and_pod_deleted $DOM_KEY 0
1921
+ trace " verify the pod of admin server is deleted"
1922
+ verify_pod_deleted $DOM_KEY 0
1941
1923
1942
1924
trace " verify $MS_NUM number of managed servers for deletion"
1943
1925
local i
1944
1926
for i in $( seq 1 $MS_NUM ) ;
1945
1927
do
1946
- trace " verify service and pod of managed server $i is deleted"
1947
- verify_service_and_pod_deleted $DOM_KEY $i
1928
+ trace " verify pod of managed server $i is deleted"
1929
+ verify_pod_deleted $DOM_KEY $i
1948
1930
done
1949
1931
trace Done. Verified.
1950
1932
}
@@ -2168,7 +2150,7 @@ function test_cluster_scale {
2168
2150
sed -i -e " 0,/replicas:/s/replicas:.*/replicas: 2/" $domainCR
2169
2151
kubectl apply -f $domainCR
2170
2152
2171
- verify_service_and_pod_deleted $DOM_KEY 3
2153
+ verify_pod_deleted $DOM_KEY 3
2172
2154
verify_webapp_load_balancing $DOM_KEY 2
2173
2155
2174
2156
# verify that scaling $DOM_KEY had no effect on another domain
0 commit comments