Skip to content

Commit

Permalink
metrics: Improve latency network cleanup
Browse files Browse the repository at this point in the history
This PR improves the latency network cleanup by removing the pods
even if the test fails.

Fixes #8658

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
  • Loading branch information
GabyCT committed Dec 13, 2023
1 parent a998e89 commit 6350df9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/metrics/network/latency_kubernetes/latency-network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ function remove_tmp_file() {

trap remove_tmp_file EXIT

function latency_cleanup() {
info "Latency test cleanup"
kubectl delete -f "${SCRIPT_PATH}/latency-server.yaml"
kubectl delete -f "${SCRIPT_PATH}/latency-client.yaml"
}

function main() {
init_env
cmds=("bc" "jq")
Expand Down Expand Up @@ -80,9 +86,6 @@ EOF
metrics_json_add_array_element "$json"
metrics_json_end_array "Results"
metrics_json_save

kubectl delete pod "$client_pod_name" "$server_pod_name"
kubectl get pods -A
check_processes
trap latency_cleanup EXIT
}
main "$@"

0 comments on commit 6350df9

Please sign in to comment.