mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 01:38:26 +00:00
perf(test): tighten telegram media e2e flush windows
This commit is contained in:
@@ -14,8 +14,8 @@ const resolvePinnedHostname = ssrf.resolvePinnedHostname;
|
|||||||
const lookupMock = vi.fn();
|
const lookupMock = vi.fn();
|
||||||
let resolvePinnedHostnameSpy: ReturnType<typeof vi.spyOn> = null;
|
let resolvePinnedHostnameSpy: ReturnType<typeof vi.spyOn> = null;
|
||||||
const TELEGRAM_TEST_TIMINGS = {
|
const TELEGRAM_TEST_TIMINGS = {
|
||||||
mediaGroupFlushMs: 75,
|
mediaGroupFlushMs: 20,
|
||||||
textFragmentGapMs: 120,
|
textFragmentGapMs: 30,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const sleep = async (ms: number) => {
|
const sleep = async (ms: number) => {
|
||||||
@@ -300,7 +300,7 @@ describe("telegram media groups", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const MEDIA_GROUP_TEST_TIMEOUT_MS = process.platform === "win32" ? 45_000 : 20_000;
|
const MEDIA_GROUP_TEST_TIMEOUT_MS = process.platform === "win32" ? 45_000 : 20_000;
|
||||||
const MEDIA_GROUP_FLUSH_MS = TELEGRAM_TEST_TIMINGS.mediaGroupFlushMs + 120;
|
const MEDIA_GROUP_FLUSH_MS = TELEGRAM_TEST_TIMINGS.mediaGroupFlushMs + 60;
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"buffers messages with same media_group_id and processes them together",
|
"buffers messages with same media_group_id and processes them together",
|
||||||
@@ -737,7 +737,7 @@ describe("telegram text fragments", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const TEXT_FRAGMENT_TEST_TIMEOUT_MS = process.platform === "win32" ? 45_000 : 20_000;
|
const TEXT_FRAGMENT_TEST_TIMEOUT_MS = process.platform === "win32" ? 45_000 : 20_000;
|
||||||
const TEXT_FRAGMENT_FLUSH_MS = TELEGRAM_TEST_TIMINGS.textFragmentGapMs + 160;
|
const TEXT_FRAGMENT_FLUSH_MS = TELEGRAM_TEST_TIMINGS.textFragmentGapMs + 80;
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"buffers near-limit text and processes sequential parts as one message",
|
"buffers near-limit text and processes sequential parts as one message",
|
||||||
|
|||||||
Reference in New Issue
Block a user