test(cli): reduce polling frequency in waitUntilReady to avoid starvation

This commit is contained in:
mkorwel
2026-04-16 16:39:09 +00:00
parent ca9002e859
commit 761ba4bd0d
+3 -3
View File
@@ -233,7 +233,7 @@ class XtermStdout extends EventEmitter {
});
let attempts = 0;
const maxAttempts = 2000;
const maxAttempts = 100;
let lastCurrent = '';
let lastExpected = '';
@@ -293,9 +293,9 @@ class XtermStdout extends EventEmitter {
attempts++;
await act(async () => {
if (vi.isFakeTimers()) {
await vi.advanceTimersByTimeAsync(5);
await vi.advanceTimersByTimeAsync(100);
} else {
await new Promise((resolve) => setTimeout(resolve, 5));
await new Promise((resolve) => setTimeout(resolve, 100));
}
});
}