diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2017-12-19 13:56:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-19 13:56:41 +0000 |
commit | b64f8b5912ed48112ae8e7897aed76ea2d4f27fe (patch) | |
tree | 0c34aec8ea87e812c4eb9ca4465b9e91ef23e18a /scripts | |
parent | 0c26735bbdd5bcce3bf0bb9e5575a77fce08cc30 (diff) |
kill kafka after integ tests (#383)
If kafka is still running when our test script exits, travis gets stuck.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/travis-test.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/travis-test.sh b/scripts/travis-test.sh index 5e32ed35..2d033215 100755 --- a/scripts/travis-test.sh +++ b/scripts/travis-test.sh @@ -40,6 +40,12 @@ function travis_end { 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 ./scripts/find-lint.sh fi @@ -78,6 +84,11 @@ if [ "${TEST_SUITE:-integ-test}" == "integ-test" ]; then ./scripts/install-local-kafka.sh 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 for i in roomserver syncserver mediaapi; do travis_start "$i-integration-tests" "Running integration tests for $i" |