fix(test-utils): bump waitFor default timeout to 10s
Under full `just test-all` load the Phoenix socket can take a beat to propagate a new subscription's filter to the backend before a mutation fires, so R-01 occasionally timed out at 5s. Passing runs still resolve instantly on event arrival — this only widens the flake window. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -73,7 +73,10 @@ export async function subscribePostgresChanges<T = Record<string, unknown>>(
|
||||
|
||||
function waitFor(
|
||||
predicate: (e: { eventType: string; new: T; old: T | null }) => boolean,
|
||||
timeoutMs = 5_000
|
||||
// 10s default: under load (full `just test-all`), the Phoenix socket can take
|
||||
// a beat to propagate a fresh subscription's filter before the mutation fires.
|
||||
// Passing runs resolve immediately on event arrival — this only bounds the flake.
|
||||
timeoutMs = 10_000
|
||||
) {
|
||||
const existing = events.find(predicate);
|
||||
if (existing) return Promise.resolve(existing);
|
||||
|
||||
Reference in New Issue
Block a user