Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

test: bound the sharing re-export race wait by wall-clock to stop a CI flake

[._.]/ Adam Eivy2271b5356469
diff --git a/server/services/sharing/subscriptions.test.js b/server/services/sharing/subscriptions.test.js
index d4ab69118e..3257d89cf9 100644
--- a/server/services/sharing/subscriptions.test.js
+++ b/server/services/sharing/subscriptions.test.js
@@ -232,7 +232,9 @@ describe('sharing/subscriptions', () => {
// vi.waitFor polls on setTimeout, which these tests fake; poll on setImmediate.
async function until(check) {
- for (let i = 0; i < 2000; i++) {
+ // Bound by wall-clock, not iterations: the export awaits real fs I/O, which a loaded CI box can stretch.
+ const deadline = Date.now() + 10000;
+ while (Date.now() < deadline) {
if (await check()) return;
await new Promise((r) => setImmediate(r));
}