1
0
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:
Ruben Bridgewater
2016-04-29 13:07:40 +02:00
parent a1755b91fb
commit 27eac2f594

View File

@@ -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();
}); });
}); });