Skip to content

Commit

Permalink
skip use pod_count in e2e's check_gmc_status, the pod_count is not a…
Browse files Browse the repository at this point in the history
…currate sometimes when terninating pod is not cleared but counted

Signed-off-by: KfreeZ <[email protected]>
  • Loading branch information
KfreeZ committed Sep 4, 2024
1 parent bef38c4 commit 0f1e843
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/scripts/e2e/gmc_xeon_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function validate_audioqa() {
pods_count=$(kubectl get pods -n $AUDIOQA_NAMESPACE -o jsonpath='{.items[*].metadata.name}' | wc -w)
# expected_ready_pods, expected_external_pods, expected_total_pods
# pods_count-1 is to exclude the client pod in this namespace
check_gmc_status $AUDIOQA_NAMESPACE 'audioqa' $((pods_count-1)) 0 7
check_gmc_status $AUDIOQA_NAMESPACE 'audioqa' 7 0 7
if [ $? -ne 0 ]; then
echo "GMC status is not as expected"
exit 1
Expand Down Expand Up @@ -190,7 +190,7 @@ function validate_chatqna() {
pods_count=$(kubectl get pods -n $CHATQNA_NAMESPACE -o jsonpath='{.items[*].metadata.name}' | wc -w)
# expected_ready_pods, expected_external_pods, expected_total_pods
# pods_count-1 is to exclude the client pod in this namespace
check_gmc_status $CHATQNA_NAMESPACE 'chatqa' $((pods_count-1)) 0 9
check_gmc_status $CHATQNA_NAMESPACE 'chatqa' 9 0 9
if [ $? -ne 0 ]; then
echo "GMC status is not as expected"
exit 1
Expand Down Expand Up @@ -260,7 +260,7 @@ function validate_chatqna_with_dataprep() {
pods_count=$(kubectl get pods -n $CHATQNA_DATAPREP_NAMESPACE -o jsonpath='{.items[*].metadata.name}' | wc -w)
# expected_ready_pods, expected_external_pods, expected_total_pods
# pods_count-1 is to exclude the client pod in this namespace
check_gmc_status $CHATQNA_DATAPREP_NAMESPACE 'chatqa' $((pods_count-1)) 0 10
check_gmc_status $CHATQNA_DATAPREP_NAMESPACE 'chatqa' 10 0 10
if [ $? -ne 0 ]; then
echo "GMC status is not as expected"
exit 1
Expand Down Expand Up @@ -353,7 +353,7 @@ function validate_chatqna_in_switch() {
pods_count=$(kubectl get pods -n $CHATQNA_SWITCH_NAMESPACE -o jsonpath='{.items[*].metadata.name}' | wc -w)
# expected_ready_pods, expected_external_pods, expected_total_pods
# pods_count-1 is to exclude the client pod in this namespace
check_gmc_status $CHATQNA_SWITCH_NAMESPACE 'switch' $((pods_count-1)) 0 15
check_gmc_status $CHATQNA_SWITCH_NAMESPACE 'switch' 15 0 15
if [ $? -ne 0 ]; then
echo "GMC status is not as expected"
exit 1
Expand Down Expand Up @@ -444,7 +444,7 @@ function validate_modify_config() {
fi

pods_count=$(kubectl get pods -n $MODIFY_STEP_NAMESPACE -o jsonpath='{.items[*].metadata.name}' | wc -w)
check_gmc_status $MODIFY_STEP_NAMESPACE 'codegen' $pods_count 0 3
check_gmc_status $MODIFY_STEP_NAMESPACE 'codegen' 3 0 3
if [ $? -ne 0 ]; then
echo "GMC status is not as expected"
exit 1
Expand All @@ -461,7 +461,7 @@ function validate_modify_config() {
exit 1
fi

check_gmc_status $MODIFY_STEP_NAMESPACE 'codegen' $pods_count 0 3
check_gmc_status $MODIFY_STEP_NAMESPACE 'codegen' 3 0 3
if [ $? -ne 0 ]; then
echo "GMC status is not as expected"
exit 1
Expand Down Expand Up @@ -495,7 +495,7 @@ function validate_remove_step() {
fi

pods_count=$(kubectl get pods -n $DELETE_STEP_NAMESPACE -o jsonpath='{.items[*].metadata.name}' | wc -w)
check_gmc_status $DELETE_STEP_NAMESPACE 'codegen' $pods_count 0 3
check_gmc_status $DELETE_STEP_NAMESPACE 'codegen' 3 0 3
if [ $? -ne 0 ]; then
echo "GMC status is not as expected"
exit 1
Expand Down

0 comments on commit 0f1e843

Please sign in to comment.