Skip to content

Commit e0b9f0d

Browse files
author
Ruben Bridgewater
committed
Fix race condition in tests
1 parent 8c0d113 commit e0b9f0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+60
-60
lines changed

test/commands/blpop.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe("The 'blpop' method", function () {
1515

1616
beforeEach(function (done) {
1717
client = redis.createClient.apply(redis.createClient, args);
18-
client.once("connect", function () {
18+
client.once("ready", function () {
1919
client.flushdb(done);
2020
});
2121
});

test/commands/dbsize.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe("The 'dbsize' method", function () {
2323

2424
beforeEach(function (done) {
2525
client = redis.createClient.apply(redis.createClient, args);
26-
client.once("connect", function () {
26+
client.once("ready", function () {
2727
client.quit();
2828
});
2929
client.on('end', function () {
@@ -44,7 +44,7 @@ describe("The 'dbsize' method", function () {
4444

4545
beforeEach(function (done) {
4646
client = redis.createClient.apply(redis.createClient, args);
47-
client.once("connect", function () {
47+
client.once("ready", function () {
4848
client.flushdb(function (err, res) {
4949
helper.isString("OK")(err, res);
5050
done();

test/commands/del.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe("The 'del' method", function () {
1313

1414
beforeEach(function (done) {
1515
client = redis.createClient.apply(redis.createClient, args);
16-
client.once("connect", function () {
16+
client.once("ready", function () {
1717
client.flushdb(done);
1818
});
1919
});

test/commands/eval.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe("The 'eval' method", function () {
1616

1717
beforeEach(function (done) {
1818
client = redis.createClient.apply(redis.createClient, args);
19-
client.once("connect", function () {
19+
client.once("ready", function () {
2020
client.flushdb(done);
2121
});
2222
});

test/commands/exits.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe("The 'exits' method", function () {
1313

1414
beforeEach(function (done) {
1515
client = redis.createClient.apply(redis.createClient, args);
16-
client.once("connect", function () {
16+
client.once("ready", function () {
1717
client.flushdb(done);
1818
});
1919
});

test/commands/expire.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe("The 'expire' method", function () {
1313

1414
beforeEach(function (done) {
1515
client = redis.createClient.apply(redis.createClient, args);
16-
client.once("connect", function () {
16+
client.once("ready", function () {
1717
client.flushdb(done);
1818
});
1919
});

test/commands/flushdb.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe("The 'flushdb' method", function () {
2323

2424
beforeEach(function (done) {
2525
client = redis.createClient.apply(redis.createClient, args);
26-
client.once("connect", function () {
26+
client.once("ready", function () {
2727
client.quit();
2828
});
2929
client.on('end', function () {
@@ -44,7 +44,7 @@ describe("The 'flushdb' method", function () {
4444

4545
beforeEach(function (done) {
4646
client = redis.createClient.apply(redis.createClient, args);
47-
client.once("connect", function () {
47+
client.once("ready", function () {
4848
done();
4949
});
5050
});

test/commands/geoadd.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe("The 'geoadd' method", function () {
1313

1414
beforeEach(function (done) {
1515
client = redis.createClient.apply(redis.createClient, args);
16-
client.once("connect", function () {
16+
client.once("ready", function () {
1717
client.flushdb(done);
1818
});
1919
});

test/commands/get.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe("The 'get' method", function () {
2323

2424
beforeEach(function (done) {
2525
client = redis.createClient.apply(redis.createClient, args);
26-
client.once("connect", function () {
26+
client.once("ready", function () {
2727
client.quit();
2828
});
2929
client.on('end', function () {
@@ -44,7 +44,7 @@ describe("The 'get' method", function () {
4444

4545
beforeEach(function (done) {
4646
client = redis.createClient.apply(redis.createClient, args);
47-
client.once("connect", function () {
47+
client.once("ready", function () {
4848
done();
4949
});
5050
});

test/commands/getset.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe("The 'getset' method", function () {
2424

2525
beforeEach(function (done) {
2626
client = redis.createClient.apply(redis.createClient, args);
27-
client.once("connect", function () {
27+
client.once("ready", function () {
2828
client.quit();
2929
});
3030
client.on('end', function () {
@@ -46,7 +46,7 @@ describe("The 'getset' method", function () {
4646

4747
beforeEach(function (done) {
4848
client = redis.createClient.apply(redis.createClient, args);
49-
client.once("connect", function () {
49+
client.once("ready", function () {
5050
done();
5151
});
5252
});

0 commit comments

Comments
 (0)