You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
fix: always emit an error when the connection drops
This commit is contained in:
@@ -507,8 +507,7 @@ describe('The nodeRedis client', () => {
|
||||
}, 50)
|
||||
})
|
||||
|
||||
// TODO: Fix this by adding the CONNECTION_BROKEN back in
|
||||
it.skip('enqueues operation and keep the queue while trying to reconnect', (done) => {
|
||||
it('enqueues operation and keep the queue while trying to reconnect', (done) => {
|
||||
client = redis.createClient(9999, null, {
|
||||
retryStrategy (options) {
|
||||
if (options.attempt < 4) {
|
||||
@@ -519,7 +518,6 @@ describe('The nodeRedis client', () => {
|
||||
let i = 0
|
||||
|
||||
client.on('error', (err) => {
|
||||
console.log(err)
|
||||
if (err.code === 'NR_CLOSED') {
|
||||
assert(i, 3)
|
||||
assert.strictEqual(client.offlineQueue.length, 0)
|
||||
|
Reference in New Issue
Block a user