You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Prevent a race condition by just forcefully ending the connection in the test
This commit is contained in:
@@ -137,6 +137,7 @@ describe("The 'multi' method", function () {
|
|||||||
client.monitor(function (e) {
|
client.monitor(function (e) {
|
||||||
client.on('error', function (err) {
|
client.on('error', function (err) {
|
||||||
assert.strictEqual(err.code, 'EXECABORT');
|
assert.strictEqual(err.code, 'EXECABORT');
|
||||||
|
client.end(false);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
var multi = client.multi();
|
var multi = client.multi();
|
||||||
@@ -149,6 +150,7 @@ describe("The 'multi' method", function () {
|
|||||||
// Check that using monitor with a transactions results in an error
|
// Check that using monitor with a transactions results in an error
|
||||||
client.multi().set('foo', 'bar').monitor().exec(function (err, res) {
|
client.multi().set('foo', 'bar').monitor().exec(function (err, res) {
|
||||||
assert.strictEqual(err.code, 'EXECABORT');
|
assert.strictEqual(err.code, 'EXECABORT');
|
||||||
|
client.end(false);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user