1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

Explicitly install hiredis on appveyor and only use start / end clients if needed

This commit is contained in:
Ruben Bridgewater
2015-11-23 13:22:07 +01:00
parent 6711c94d1b
commit f82fb6cf42
2 changed files with 15 additions and 10 deletions

View File

@@ -24,7 +24,8 @@ install:
# Get the latest stable version of Node 0.STABLE.latest # Get the latest stable version of Node 0.STABLE.latest
- ps: Install-Product node $env:nodejs_version - ps: Install-Product node $env:nodejs_version
# Typical npm stuff. Use msvs 2013 for the hiredis parser # Typical npm stuff. Use msvs 2013 for the hiredis parser
- npm install --msvs_version=2013 - npm install hiredis --msvs_version=2013
- npm install
# Post-install test scripts. # Post-install test scripts.
test_script: test_script:

View File

@@ -11,7 +11,7 @@ describe("The 'client' method", function () {
var pattern = /addr=/; var pattern = /addr=/;
describe("using " + parser + " and " + ip, function () { describe("using " + parser + " and " + ip, function () {
var client, client2; var client;
beforeEach(function (done) { beforeEach(function (done) {
client = redis.createClient.apply(redis.createClient, args); client = redis.createClient.apply(redis.createClient, args);
@@ -20,16 +20,8 @@ describe("The 'client' method", function () {
}); });
}); });
beforeEach(function (done) {
client2 = redis.createClient.apply(redis.createClient, args);
client2.once("ready", function () {
done();
});
});
afterEach(function () { afterEach(function () {
client.end(true); client.end(true);
client2.end(true);
}); });
describe('list', function () { describe('list', function () {
@@ -62,6 +54,18 @@ describe("The 'client' method", function () {
}); });
describe('setname / getname', function () { describe('setname / getname', function () {
var client2;
beforeEach(function (done) {
client2 = redis.createClient.apply(redis.createClient, args);
client2.once("ready", function () {
done();
});
});
afterEach(function () {
client2.end(true);
});
it('sets the name', function (done) { it('sets the name', function (done) {
helper.serverVersionAtLeast.call(this, client, [2, 6, 9]); helper.serverVersionAtLeast.call(this, client, [2, 6, 9]);