lockCategoriesHTTP

- highLoad
- compact getUserID
- add genRandomValue method
This commit is contained in:
Michael C
2023-09-27 23:19:25 -04:00
parent 5e3ec895d8
commit 7364499f11
6 changed files with 87 additions and 229 deletions

View File

@@ -13,24 +13,18 @@ describe("High load test", () => {
sinon.restore();
});
it("Should return 503 on getTopUsers", async () => {
await client.get("/api/getTopUsers?sortType=0")
.then(res => {
assert.strictEqual(res.status, 503);
});
});
it("Should return 503 on getTopUsers", () =>
client.get("/api/getTopUsers?sortType=0")
.then(res => assert.strictEqual(res.status, 503))
);
it("Should return 503 on getTopCategoryUsers", async () => {
await client.get("/api/getTopCategoryUsers?sortType=0&category=sponsor")
.then(res => {
assert.strictEqual(res.status, 503);
});
});
it("Should return 503 on getTopCategoryUsers", () =>
client.get("/api/getTopCategoryUsers?sortType=0&category=sponsor")
.then(res => assert.strictEqual(res.status, 503))
);
it("Should return 0 on getTotalStats", async () => {
await client.get("/api/getTotalStats")
.then(res => {
assert.strictEqual(res.status, 200);
});
});
it("Should return 0 on getTotalStats", () =>
client.get("/api/getTotalStats")
.then(res => assert.strictEqual(res.status, 200))
);
});