mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 06:44:32 +00:00
perf: speed up gateway lock tests
This commit is contained in:
@@ -90,16 +90,16 @@ describe("gateway lock", () => {
|
|||||||
const lock = await acquireGatewayLock({
|
const lock = await acquireGatewayLock({
|
||||||
env,
|
env,
|
||||||
allowInTests: true,
|
allowInTests: true,
|
||||||
timeoutMs: 100,
|
timeoutMs: 50,
|
||||||
pollIntervalMs: 5,
|
pollIntervalMs: 2,
|
||||||
});
|
});
|
||||||
expect(lock).not.toBeNull();
|
expect(lock).not.toBeNull();
|
||||||
|
|
||||||
const pending = acquireGatewayLock({
|
const pending = acquireGatewayLock({
|
||||||
env,
|
env,
|
||||||
allowInTests: true,
|
allowInTests: true,
|
||||||
timeoutMs: 100,
|
timeoutMs: 15,
|
||||||
pollIntervalMs: 5,
|
pollIntervalMs: 2,
|
||||||
});
|
});
|
||||||
await expect(pending).rejects.toBeInstanceOf(GatewayLockError);
|
await expect(pending).rejects.toBeInstanceOf(GatewayLockError);
|
||||||
|
|
||||||
@@ -107,8 +107,8 @@ describe("gateway lock", () => {
|
|||||||
const lock2 = await acquireGatewayLock({
|
const lock2 = await acquireGatewayLock({
|
||||||
env,
|
env,
|
||||||
allowInTests: true,
|
allowInTests: true,
|
||||||
timeoutMs: 100,
|
timeoutMs: 30,
|
||||||
pollIntervalMs: 5,
|
pollIntervalMs: 2,
|
||||||
});
|
});
|
||||||
await lock2?.release();
|
await lock2?.release();
|
||||||
await cleanup();
|
await cleanup();
|
||||||
@@ -173,8 +173,8 @@ describe("gateway lock", () => {
|
|||||||
const pending = acquireGatewayLock({
|
const pending = acquireGatewayLock({
|
||||||
env,
|
env,
|
||||||
allowInTests: true,
|
allowInTests: true,
|
||||||
timeoutMs: 50,
|
timeoutMs: 15,
|
||||||
pollIntervalMs: 5,
|
pollIntervalMs: 2,
|
||||||
staleMs: 10_000,
|
staleMs: 10_000,
|
||||||
platform: "linux",
|
platform: "linux",
|
||||||
});
|
});
|
||||||
@@ -198,8 +198,8 @@ describe("gateway lock", () => {
|
|||||||
const lock = await acquireGatewayLock({
|
const lock = await acquireGatewayLock({
|
||||||
env,
|
env,
|
||||||
allowInTests: true,
|
allowInTests: true,
|
||||||
timeoutMs: 80,
|
timeoutMs: 30,
|
||||||
pollIntervalMs: 5,
|
pollIntervalMs: 2,
|
||||||
staleMs: 1,
|
staleMs: 1,
|
||||||
platform: "linux",
|
platform: "linux",
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user