@rotorsoft/act-tck 1.26.7 → 1.26.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/@types/store-tck.d.ts.map +1 -1
- package/dist/index.cjs +22 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1827,6 +1827,28 @@ var runStoreTck = (options) => {
|
|
|
1827
1827
|
const leased = await store.claim(100, 100, `w-${uid()}`, 1e5);
|
|
1828
1828
|
expect8(leased.find((l) => l.stream === s)).toBeDefined();
|
|
1829
1829
|
});
|
|
1830
|
+
it7("exposes a future deferred_at via query_streams (#1221)", async () => {
|
|
1831
|
+
const deferred = `defer-qs-${uid()}`;
|
|
1832
|
+
const plain = `defer-qs-plain-${uid()}`;
|
|
1833
|
+
await store.subscribe([{ stream: deferred }, { stream: plain }]);
|
|
1834
|
+
for (const s of [deferred, plain])
|
|
1835
|
+
await store.commit(
|
|
1836
|
+
s,
|
|
1837
|
+
[inc(1)],
|
|
1838
|
+
make_meta({ stream: s })
|
|
1839
|
+
);
|
|
1840
|
+
const due = Date.now() + 36e5;
|
|
1841
|
+
await store.defer([deferred], due);
|
|
1842
|
+
const seen = /* @__PURE__ */ new Map();
|
|
1843
|
+
await store.query_streams((p) => {
|
|
1844
|
+
if (p.stream === deferred || p.stream === plain)
|
|
1845
|
+
seen.set(p.stream, p.deferred_at);
|
|
1846
|
+
});
|
|
1847
|
+
const got = seen.get(deferred);
|
|
1848
|
+
expect8(got).toBeDefined();
|
|
1849
|
+
expect8(Math.abs(got - due)).toBeLessThan(2e3);
|
|
1850
|
+
expect8(seen.get(plain)).toBeUndefined();
|
|
1851
|
+
});
|
|
1830
1852
|
it7("defers streams matching a filter and counts matches", async () => {
|
|
1831
1853
|
const tag = uid();
|
|
1832
1854
|
const a = `deferfilter-${tag}-a`;
|