Skip to content

Commit

Permalink
tests: add comments about travis windows issue workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Salakar committed Feb 9, 2020
1 parent 9f01198 commit 176bfc2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/node_redis.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,20 @@ var fork = require('child_process').fork;
var redis = config.redis;
var client;

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

describe('The node_redis client', function () {
Expand Down

0 comments on commit 176bfc2

Please sign in to comment.