Skip to content

Commit

Permalink
test: kill background jobs before exiting test script
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobgy committed Jul 21, 2021
1 parent ca45b15 commit a80061f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/frontend-integration-test/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ fi

npm install

function clean_up() {
set +e

echo "Stopping background jobs..."
kill -15 %1
kill -15 %2
}
trap clean_up EXIT SIGINT SIGTERM

# Port forward the UI so tests can work against localhost
POD=`kubectl get pods -n ${NAMESPACE} -l app=ml-pipeline-ui -o jsonpath='{.items[0].metadata.name}'`
kubectl port-forward -n ${NAMESPACE} ${POD} 3000:3000 &
Expand Down

0 comments on commit a80061f

Please sign in to comment.