mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
feat(voice): add reusable geometry actions
- turn named places and mapped landmarks into reusable bounded areas - count loaded records inside resolved, drawn and annotated geometry - find recent imagery for an area, the view or the pointer snapshot - keep osm place search behind an operator-configured overpass endpoint - preserve cancellation, ownership and follow-up memory across every action - cover geometry, provider lifecycle, cache isolation and voice routing
This commit is contained in:
1 parent
01979bba1e
commit
b234d7b427
84 files changed
+14262
-1681
No files matched your search
@@ -54,9 +54,24 @@ function probeTransport(status) {
|
||||
return { seen, fetchImpl };
|
||||
}
|
||||
const stalled = (init) => new Promise((_, reject) => init.signal.addEventListener('abort', () => reject(init.signal.reason)));
|
||||
const stalledWithReferencedWait = (init) =>
|
||||
new Promise((_, reject) => {
|
||||
// AbortSignal.timeout() is intentionally unref'd in Node. Keep this one
|
||||
// timeout test alive until the signal fires so an isolated test process
|
||||
// cannot exit with a still-pending assertion.
|
||||
const keepAlive = setTimeout(() => {}, 1000);
|
||||
init.signal.addEventListener(
|
||||
'abort',
|
||||
() => {
|
||||
clearTimeout(keepAlive);
|
||||
reject(init.signal.reason);
|
||||
},
|
||||
{ once: true },
|
||||
);
|
||||
});
|
||||
|
||||
test('a stalled capability probe times out and queries proceed; no re-probe during backoff', async () => {
|
||||
const { seen, fetchImpl } = probeTransport(stalled);
|
||||
const { seen, fetchImpl } = probeTransport(stalledWithReferencedWait);
|
||||
const services = createApplicationRequestServices({ fetchImpl, boundaryProbe: { timeoutMs: 20, retryMs: 60_000 } });
|
||||
const started = Date.now();
|
||||
assert.deepEqual(await services.boundaries.query('fixture'), []);
|
||||
|
||||
Reference in new issue
Block a user