Skip to content

Commit 176bfc2

Browse files
committed
tests: add comments about travis windows issue workaround
1 parent 9f01198 commit 176bfc2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/node_redis.spec.js

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

14+
// Currently Travis Windows builds hang after completing if any processes are still running,
15+
// we shutdown redis-server after all tests complete (can't do this in a
16+
// `after_script` Travis hook as it hangs before the `after` life cycles)
17+
// to workaround the issue.
18+
//
19+
// See: https://github.com/travis-ci/travis-ci/issues/8082
1420
after(function (done) {
1521
if (process.platform !== 'win32' || !process.env.CI) {
1622
return done();
1723
}
18-
require('cross-spawn').sync('redis-server', ['--service-stop'], {});
19-
done();
24+
process.nextTick(function () {
25+
require('cross-spawn').sync('redis-server', ['--service-stop'], {});
26+
done();
27+
});
2028
});
2129

2230
describe('The node_redis client', function () {

0 commit comments

Comments
 (0)