add redis process time and add timeout clause

This commit is contained in:
Michael C
2022-09-07 23:43:14 -04:00
parent bd7dfc63ff
commit 9be9d05dbe
2 changed files with 33 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));
});
});