You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Ping interval (#2321)
* fix #1598 fix #2276 - add `pingInterval` to client config * setPingTimer on ready (instead of on connect) * use isReady (instead of isOpen) and fix test * Update client-configuration.md
This commit is contained in:
@@ -862,4 +862,16 @@ describe('Client', () => {
|
||||
client.unref();
|
||||
client.ref();
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
|
||||
testUtils.testWithClient('pingInterval', async client => {
|
||||
assert.deepEqual(
|
||||
await once(client, 'ping-interval'),
|
||||
['PONG']
|
||||
);
|
||||
}, {
|
||||
...GLOBAL.SERVERS.OPEN,
|
||||
clientOptions: {
|
||||
pingInterval: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user