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

"forward port" changes from 4.6.9

This commit is contained in:
Leibale
2023-09-19 19:23:24 -04:00
parent 819ca71538
commit 099f16e45f
16 changed files with 306 additions and 260 deletions

View File

@@ -11,13 +11,13 @@ describe('LATENCY LATEST', () => {
});
testUtils.testWithClient('client.latencyLatest', async client => {
await Promise.all([
const [,, reply] = await Promise.all([
client.configSet('latency-monitor-threshold', '100'),
client.sendCommand(['DEBUG', 'SLEEP', '1'])
client.sendCommand(['DEBUG', 'SLEEP', '1']),
client.latencyLatest()
]);
const latency = await client.latencyLatest();
assert.ok(Array.isArray(latency));
for (const [name, timestamp, latestLatency, allTimeLatency] of latency) {
assert.ok(Array.isArray(reply));
for (const [name, timestamp, latestLatency, allTimeLatency] of reply) {
assert.equal(typeof name, 'string');
assert.equal(typeof timestamp, 'number');
assert.equal(typeof latestLatency, 'number');