kill kafka after integ tests (#383)
If kafka is still running when our test script exits, travis gets stuck.main
parent
0c26735bbd
commit
b64f8b5912
|
@ -40,6 +40,12 @@ function travis_end {
|
||||||
echo -en "travis_fold:end:$name\r"
|
echo -en "travis_fold:end:$name\r"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function kill_kafka {
|
||||||
|
echo "killing kafka"
|
||||||
|
# sometimes kafka doesn't die on a SIGTERM so we SIGKILL it.
|
||||||
|
killall -9 -v java
|
||||||
|
}
|
||||||
|
|
||||||
if [ "${TEST_SUITE:-lint}" == "lint" ]; then
|
if [ "${TEST_SUITE:-lint}" == "lint" ]; then
|
||||||
./scripts/find-lint.sh
|
./scripts/find-lint.sh
|
||||||
fi
|
fi
|
||||||
|
@ -78,6 +84,11 @@ if [ "${TEST_SUITE:-integ-test}" == "integ-test" ]; then
|
||||||
./scripts/install-local-kafka.sh
|
./scripts/install-local-kafka.sh
|
||||||
travis_end
|
travis_end
|
||||||
|
|
||||||
|
# make sure we kill off zookeeper/kafka on exit, because it stops the
|
||||||
|
# travis container being cleaned up (cf
|
||||||
|
# https://github.com/travis-ci/travis-ci/issues/8082)
|
||||||
|
trap kill_kafka EXIT
|
||||||
|
|
||||||
# Run the integration tests
|
# Run the integration tests
|
||||||
for i in roomserver syncserver mediaapi; do
|
for i in roomserver syncserver mediaapi; do
|
||||||
travis_start "$i-integration-tests" "Running integration tests for $i"
|
travis_start "$i-integration-tests" "Running integration tests for $i"
|
||||||
|
|
Loading…
Reference in New Issue