Skip to content

Commit 896dabb

Browse files
author
Tom Barnes
committed
Merge remote-tracking branch 'origin' into integration-test-2
2 parents fd8e3f2 + d67b5c2 commit 896dabb

File tree

21 files changed

+883
-817
lines changed

21 files changed

+883
-817
lines changed

pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,13 @@
496496
<artifactId>junit</artifactId>
497497
<version>${junit-version}</version>
498498
</dependency>
499+
<dependency>
500+
<groupId>org.apache.commons</groupId>
501+
<artifactId>commons-exec</artifactId>
502+
<version>1.3</version>
503+
<scope>test</scope>
504+
</dependency>
505+
499506
</dependencies>
500507

501508
<properties>

src/integration-tests/bash/run.sh

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)