Merge pull request #499 from mchangrh/getStatus-redis

add redis process time to getStatus
This commit is contained in:
Ajay Ramachandran
2022-09-29 16:52:16 -04:00
committed by GitHub
2 changed files with 34 additions and 6 deletions

View File

@@ -110,4 +110,16 @@ describe("getStatus", () => {
})
.catch(err => done(err));
});
it("Should be able to get redis latency", function (done) {
if (!config.redis?.enabled) this.skip();
client.get(endpoint)
.then(res => {
assert.strictEqual(res.status, 200);
const data = res.data;
assert.ok(data.redisProcessTime >= 0);
done();
})
.catch(err => done(err));
});
});