Skip to content

Commit 0c90b6b

Browse files
committed
Tests need only verify pod deleted
1 parent 09ddf1a commit 0c90b6b

File tree

1 file changed

+6
-24
lines changed
  • src/integration-tests/bash

1 file changed

+6
-24
lines changed

src/integration-tests/bash/run.sh

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,7 @@ function verify_domain_created {
18521852
fi
18531853
}
18541854

1855-
function verify_service_and_pod_deleted {
1855+
function verify_pod_deleted {
18561856
if [ "$#" != 2 ] ; then
18571857
fail "requires 2 parameters: domainkey serverNum, set serverNum to 0 to indicate the admin server"
18581858
fi
@@ -1869,27 +1869,9 @@ function verify_service_and_pod_deleted {
18691869
local POD_NAME="${DOMAIN_UID}-${MS_BASE_NAME}${SERVER_NUM}"
18701870
fi
18711871

1872-
local SERVICE_NAME="${POD_NAME}"
1873-
18741872
local max_count_srv=50
18751873
local max_count_pod=50
18761874
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
18931875

18941876
trace "checking if pod $POD_NAME is deleted"
18951877
local pod_count=1
@@ -1936,15 +1918,15 @@ function verify_domain_deleted {
19361918
fail "ERROR: domain still exists, exiting!"
19371919
fi
19381920

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
19411923

19421924
trace "verify $MS_NUM number of managed servers for deletion"
19431925
local i
19441926
for i in $(seq 1 $MS_NUM);
19451927
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
19481930
done
19491931
trace Done. Verified.
19501932
}
@@ -2168,7 +2150,7 @@ function test_cluster_scale {
21682150
sed -i -e "0,/replicas:/s/replicas:.*/replicas: 2/" $domainCR
21692151
kubectl apply -f $domainCR
21702152

2171-
verify_service_and_pod_deleted $DOM_KEY 3
2153+
verify_pod_deleted $DOM_KEY 3
21722154
verify_webapp_load_balancing $DOM_KEY 2
21732155

21742156
# verify that scaling $DOM_KEY had no effect on another domain

0 commit comments

Comments
 (0)