mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-22 14:30:53 +08:00
test(server): harden async trace timing (#1014)
This commit is contained in:
parent
d20dce159e
commit
0f41501d53
@ -129,7 +129,10 @@ function blockNextTraceAppend() {
|
||||
async function settlesBeforeBlockedTraceWrite<T>(promise: Promise<T>): Promise<T | null> {
|
||||
return Promise.race([
|
||||
promise,
|
||||
new Promise<null>((resolve) => setTimeout(() => resolve(null), 50)),
|
||||
// The trace hook is already blocked, so this timeout is only a failure
|
||||
// bound. Keep it generous enough that a busy CI worker cannot masquerade
|
||||
// as response/trace coupling.
|
||||
new Promise<null>((resolve) => setTimeout(() => resolve(null), 1_000)),
|
||||
])
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user