Skip to content

Commit 9f01198

Browse files
committed
chore: try workaround travis windows hanging issue
1 parent a7149e3 commit 9f01198

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.travis.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ before_install:
3434
3535
cache:
3636
directories:
37+
- "$HOME/AppData/Local/Temp/chocolatey"
3738
- "$TRAVIS_BUILD_DIR/stunnel-5.54"
3839

3940
before_script:
@@ -42,12 +43,5 @@ before_script:
4243
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
4344
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
4445
fi
45-
after_script:
46-
- |-
47-
case $TRAVIS_OS_NAME in
48-
windows)
49-
redis-server --service-stop
50-
;;
51-
esac
5246

5347
after_success: npm run coveralls

test/node_redis.spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ var fork = require('child_process').fork;
1111
var redis = config.redis;
1212
var client;
1313

14+
after(function (done) {
15+
if (process.platform !== 'win32' || !process.env.CI) {
16+
return done();
17+
}
18+
require('cross-spawn').sync('redis-server', ['--service-stop'], {});
19+
done();
20+
});
21+
1422
describe('The node_redis client', function () {
1523

1624
describe("The 'add_command' method", function () {

0 commit comments

Comments
 (0)