1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

Remove deprecated drain event

This commit is contained in:
Ruben Bridgewater
2016-12-17 17:51:51 +01:00
committed by Ruben Bridgewater
parent b72dd195a8
commit 98527e0fc5
4 changed files with 2 additions and 97 deletions

View File

@@ -952,28 +952,6 @@ describe('The node_redis client', function () {
describe('enable_offline_queue', function () {
describe('true', function () {
it('should emit drain if offline queue is flushed and nothing to buffer', function (done) {
client = redis.createClient({
parser: parser,
no_ready_check: true
});
var end = helper.callFuncAfter(done, 3);
client.set('foo', 'bar');
client.get('foo', end);
client.on('warning', function (msg) {
assert.strictEqual(
msg,
'The drain event listener is deprecated and will be removed in v.3.0.0.\n' +
'If you want to keep on listening to this event please listen to the stream drain event directly.'
);
end();
});
client.on('drain', function () {
assert(client.offline_queue.length === 0);
end();
});
});
it('does not return an error and enqueues operation', function (done) {
client = redis.createClient(9999, null, {
parser: parser