Merge pull request #2274 from PR0M3TH3AN/jules-13684010680817727303-91013058

Automated PR Review: Fix test timeouts and report findings
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-02-09 19:50:37 -05:00
commit e0106a48e7
2 files changed
+11 -5

No files matched your search

+10 -5
View File
@@ -913,15 +913,20 @@ class SubscriptionsManager {
// scheme × up to 3 schemes = ~18s) = ~30s. Reduced from 45s to prevent
// blocking the login path for nearly a minute.
const timeoutMs = 25000;
let timeoutId;
await Promise.race([
loader,
new Promise((_, reject) =>
setTimeout(
new Promise((_, reject) => {
timeoutId = setTimeout(
() => reject(new Error("Timeout loading subscriptions")),
timeoutMs
)
),
]);
);
}),
]).finally(() => {
if (timeoutId) {
clearTimeout(timeoutId);
}
});
devLogger.log("[SubscriptionsManager] ensureLoaded success");
return { ok: this.dataReady === true, error: this.lastLoadError || null, state: this.getLoadState() };
} catch (error) {
+1
View File
@@ -619,6 +619,7 @@ test(
"retry with permission prompts should populate subscriptions",
);
} finally {
manager.reset();
relayManager.setEntries(originalRelayEntries, { allowEmpty: false, updateClient: false });
nostrClient.relays = originalRelays;
nostrClient.writeRelays = originalWriteRelays;