mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 05:50:22 +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();
|
||||
let resolvePinnedHostnameSpy: ReturnType<typeof vi.spyOn> = null;
|
||||
const TELEGRAM_TEST_TIMINGS = {
|
||||
mediaGroupFlushMs: 75,
|
||||
textFragmentGapMs: 120,
|
||||
mediaGroupFlushMs: 20,
|
||||
textFragmentGapMs: 30,
|
||||
} as const;
|
||||
|
||||
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_FLUSH_MS = TELEGRAM_TEST_TIMINGS.mediaGroupFlushMs + 120;
|
||||
const MEDIA_GROUP_FLUSH_MS = TELEGRAM_TEST_TIMINGS.mediaGroupFlushMs + 60;
|
||||
|
||||
it(
|
||||
"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_FLUSH_MS = TELEGRAM_TEST_TIMINGS.textFragmentGapMs + 160;
|
||||
const TEXT_FRAGMENT_FLUSH_MS = TELEGRAM_TEST_TIMINGS.textFragmentGapMs + 80;
|
||||
|
||||
it(
|
||||
"buffers near-limit text and processes sequential parts as one message",
|
||||
|
||||
Reference in New Issue
Block a user