diff --git a/package.json b/package.json index 3999e55b3a..57c99a9bd6 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "optional-dev-dependency": "^1.0.1", "tcp-port-used": "^0.1.2", "uuid": "^2.0.1", - "uuid": "^2.0.1", "win-spawn": "^2.0.0" }, "repository": { diff --git a/test/commands/client.spec.js b/test/commands/client.spec.js index d6df117fea..1d47db708d 100644 --- a/test/commands/client.spec.js +++ b/test/commands/client.spec.js @@ -17,7 +17,7 @@ describe("The 'client' method", function () { client = redis.createClient.apply(redis.createClient, args); client.once("error", done); client.once("connect", function () { - client.flushdb(done) + client.flushdb(done); }); }); diff --git a/test/commands/eval.spec.js b/test/commands/eval.spec.js index 184759a92b..5abdb046ae 100644 --- a/test/commands/eval.spec.js +++ b/test/commands/eval.spec.js @@ -17,7 +17,7 @@ describe("The 'eval' method", function () { client = redis.createClient.apply(redis.createClient, args); client.once("error", done); client.once("connect", function () { - client.flushdb(done) + client.flushdb(done); }); }); diff --git a/test/commands/multi.spec.js b/test/commands/multi.spec.js index e8be8d0b6f..6d4def8030 100644 --- a/test/commands/multi.spec.js +++ b/test/commands/multi.spec.js @@ -89,38 +89,6 @@ describe("The 'multi' method", function () { }); }); -<<<<<<< HEAD - // I'm unclear as to the difference between this test in the test above, - // perhaps @mranney can clarify? - it('roles back a transaction when an error was provoked at queue time', function (done) { - var multi1 = client.multi(); - multi1.mset("multifoo_8", "10", "multibar_8", "20", helper.isString("OK")); - multi1.set("foo2", helper.isError()); - multi1.set("foo3", helper.isError()); - multi1.incr("multifoo_8", helper.isNumber(11)); - multi1.incr("multibar_8", helper.isNumber(21)); - multi1.exec(function () { - // Redis 2.6.5+ will abort transactions with errors - // see: http://redis.io/topics/transactions - var multibar_expected = 22; - var multifoo_expected = 12; - if (helper.serverVersionAtLeast(client, [2, 6, 5])) { - multibar_expected = 1; - multifoo_expected = 1; - } - - // Confirm that the previous command, while containing an error, still worked. - var multi2 = client.multi(); - multi2.incr("multibar_8", helper.isNumber(multibar_expected)); - multi2.incr("multifoo_8", helper.isNumber(multifoo_expected)); - multi2.exec(function (err, replies) { - assert.strictEqual(multibar_expected, replies[0]); - assert.strictEqual(multifoo_expected, replies[1]); - return done(); - }); - }); - }); - it('roles back a transaction when one command in an array of commands fails', function (done) { // test nested multi-bulk replies client.multi([ @@ -227,7 +195,7 @@ describe("The 'multi' method", function () { }); it('reports multiple exceptions when they occur', function (done) { - helper.serverVersionAtLeast.bind(this)(client, [2, 6, 5]) + helper.serverVersionAtLeast.bind(this)(client, [2, 6, 5]); client.multi().set("foo").exec(function (err, reply) { assert(Array.isArray(err), "err should be an array"); diff --git a/test/helper.js b/test/helper.js index 158e837d35..b31e90ee8d 100644 --- a/test/helper.js +++ b/test/helper.js @@ -112,7 +112,7 @@ module.exports = { var protocols = ['IPv4']; if (process.platform !== 'win32') { parsers.push('hiredis'); - protocols.push('IPv6') + protocols.push('IPv6'); } parsers.forEach(function (parser) { diff --git a/test/lib/redis-process.js b/test/lib/redis-process.js index 6e09ea36cf..6082648452 100644 --- a/test/lib/redis-process.js +++ b/test/lib/redis-process.js @@ -11,6 +11,8 @@ var tcpPortUsed = require('tcp-port-used'); // wait for redis to be listening in // all three modes (ipv4, ipv6, socket). function waitForRedis (available, cb) { + if (process.platform === 'win32') return cb(); + var ipV4 = false; var id = setInterval(function () { tcpPortUsed.check(config.PORT, '127.0.0.1') @@ -38,7 +40,7 @@ module.exports = { // the user running the test some directions. rp.once("exit", function (code) { if (code !== 0) spawnFailed = true; - }) + }); // wait for redis to become available, by // checking the port we bind on. @@ -66,26 +68,3 @@ module.exports = { }); } }; - -// wait for redis to be listening in -// all three modes (ipv4, ipv6, socket). -function waitForRedis (available, cb) { - if (process.platform === 'win32') return cb(); - - var ipV4 = false; - var id = setInterval(function () { - tcpPortUsed.check(config.PORT, '127.0.0.1') - .then(function (_ipV4) { - ipV4 = _ipV4; - return tcpPortUsed.check(config.PORT, '::1'); - }) - .then(function (ipV6) { - if (ipV6 === available && ipV4 === available && - fs.existsSync('/tmp/redis.sock') === available) { - clearInterval(id); - return cb(); - } - }); - }, 100); -} ->>>>>>> down to one failing test on Windows, time to rebase