From 9f01198c0491e419ed50902fd196df324d8abcee Mon Sep 17 00:00:00 2001 From: Salakar Date: Sun, 9 Feb 2020 14:13:05 +0000 Subject: [PATCH] chore: try workaround travis windows hanging issue --- .travis.yml | 8 +------- test/node_redis.spec.js | 8 ++++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1263695a867..18e3dbdeac3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,7 @@ before_install: cache: directories: + - "$HOME/AppData/Local/Temp/chocolatey" - "$TRAVIS_BUILD_DIR/stunnel-5.54" before_script: @@ -42,12 +43,5 @@ before_script: - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'; fi -after_script: - - |- - case $TRAVIS_OS_NAME in - windows) - redis-server --service-stop - ;; - esac after_success: npm run coveralls diff --git a/test/node_redis.spec.js b/test/node_redis.spec.js index 79f58dd5187..83a44f074dc 100644 --- a/test/node_redis.spec.js +++ b/test/node_redis.spec.js @@ -11,6 +11,14 @@ var fork = require('child_process').fork; var redis = config.redis; var client; +after(function (done) { + if (process.platform !== 'win32' || !process.env.CI) { + return done(); + } + require('cross-spawn').sync('redis-server', ['--service-stop'], {}); + done(); +}); + describe('The node_redis client', function () { describe("The 'add_command' method", function () {