(
client: RedisClientType<{}, {}, {}, 2, {}>,
errorClient: RedisClientType<{}, {}, {}, 2, {}> = client
)
| 891 | }); |
| 892 | |
| 893 | async function killClient( |
| 894 | client: RedisClientType<{}, {}, {}, 2, {}>, |
| 895 | errorClient: RedisClientType<{}, {}, {}, 2, {}> = client |
| 896 | ): Promise<void> { |
| 897 | const onceErrorPromise = once(errorClient, 'error'); |
| 898 | await client.sendCommand(['QUIT']); |
| 899 | await Promise.all([ |
| 900 | onceErrorPromise, |
| 901 | assert.rejects(client.ping()) |
| 902 | ]); |
| 903 | } |
| 904 | |
| 905 | testUtils.testWithClient('should reconnect when socket disconnects', async client => { |
| 906 | await killClient(client); |
no test coverage detected