sync robustness: per-file retry with backoff, file-granular progress, bounded config fetch timeout, honest error details (bad origin / storage unavailable), isAvailable no longer gated on navigator.onLine (isolated LAN reports offline while origin is reachable)
This commit is contained in:
parent
bb40c96f98
commit
a0db9f7862
5 changed files with 156 additions and 14 deletions
|
|
@ -236,4 +236,16 @@ describe("app sync coordinator", () => {
|
|||
});
|
||||
expect(result.status).toBe("not-configured");
|
||||
});
|
||||
|
||||
it("returns an error outcome (never throws/hangs) for a plain-HTTP origin", async () => {
|
||||
const origin = buildOrigin();
|
||||
const httpConfig = { ...config(origin), origin: "http://10.144.0.221:8080/origin" };
|
||||
const result = await runSync({
|
||||
fetchConfig: async () => httpConfig,
|
||||
fetchImpl: fakeFetch(origin),
|
||||
appVersion: "1.0.0",
|
||||
});
|
||||
expect(result.status).toBe("error");
|
||||
expect(result.status === "error" && result.detail).toContain("HTTPS");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue