@rotorsoft/act-tck 1.36.18 → 1.36.19
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 +64 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-tck.d.ts","sourceRoot":"","sources":["../../src/store-tck.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAQV,KAAK,EAIN,MAAM,sBAAsB,CAAC;AAc9B;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;;;OASG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC;;;;;;;;;OASG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;;;;;OAQG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IACxC;;;;;;;;OAQG;IACH,QAAQ,CAAC,gCAAgC,CAAC,EAAE,OAAO,CAAC;IACpD;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;I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C;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IACxD;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,WAAW,YAAa,eAAe,KAAG,IAiiKtD,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -2308,6 +2308,36 @@ var runStoreTck = (options) => {
|
|
|
2308
2308
|
await fresh.dispose();
|
|
2309
2309
|
}
|
|
2310
2310
|
});
|
|
2311
|
+
(0, import_vitest9.it)("records the lease holder for a zero-length lease, so its ack lands", async () => {
|
|
2312
|
+
const fresh = await options.factory();
|
|
2313
|
+
try {
|
|
2314
|
+
await fresh.drop();
|
|
2315
|
+
await fresh.seed();
|
|
2316
|
+
const s = `lease-zero-${uid()}`;
|
|
2317
|
+
await fresh.subscribe([{ stream: s }]);
|
|
2318
|
+
const [committed] = await fresh.commit(
|
|
2319
|
+
s,
|
|
2320
|
+
[inc(1)],
|
|
2321
|
+
make_meta({ stream: s })
|
|
2322
|
+
);
|
|
2323
|
+
await correlate(fresh);
|
|
2324
|
+
const leased = await fresh.claim(1, 0, `w-${uid()}`, 0);
|
|
2325
|
+
const mine = leased.find((l) => l.stream === s);
|
|
2326
|
+
(0, import_vitest9.expect)(mine).toBeDefined();
|
|
2327
|
+
const acked = await fresh.ack([{ ...mine, at: committed.id }]);
|
|
2328
|
+
(0, import_vitest9.expect)(acked).toHaveLength(1);
|
|
2329
|
+
let at = -1;
|
|
2330
|
+
await fresh.query_streams(
|
|
2331
|
+
(p) => {
|
|
2332
|
+
at = p.at;
|
|
2333
|
+
},
|
|
2334
|
+
{ stream: s, stream_exact: true }
|
|
2335
|
+
);
|
|
2336
|
+
(0, import_vitest9.expect)(at).toBe(committed.id);
|
|
2337
|
+
} finally {
|
|
2338
|
+
await fresh.dispose();
|
|
2339
|
+
}
|
|
2340
|
+
});
|
|
2311
2341
|
(0, import_vitest9.it)("reports lagging=true from the lagging frontier and false from the leading frontier", async () => {
|
|
2312
2342
|
const fresh = await options.factory();
|
|
2313
2343
|
try {
|
|
@@ -3700,6 +3730,25 @@ var runStoreTck = (options) => {
|
|
|
3700
3730
|
}
|
|
3701
3731
|
(0, import_vitest9.expect)([...visited].sort()).toEqual([...names].sort());
|
|
3702
3732
|
});
|
|
3733
|
+
(0, import_vitest9.it)("limit: 0 returns no rows", async () => {
|
|
3734
|
+
const s = `qs-zero-${uid()}`;
|
|
3735
|
+
await store.subscribe([{ stream: s }]);
|
|
3736
|
+
const seen = [];
|
|
3737
|
+
const push = (p) => {
|
|
3738
|
+
seen.push(p.stream);
|
|
3739
|
+
};
|
|
3740
|
+
const filter = { stream: s, stream_exact: true };
|
|
3741
|
+
const control = await store.query_streams(push, filter);
|
|
3742
|
+
(0, import_vitest9.expect)(control.count).toBe(1);
|
|
3743
|
+
(0, import_vitest9.expect)(seen).toEqual([s]);
|
|
3744
|
+
seen.length = 0;
|
|
3745
|
+
const { count } = await store.query_streams(push, {
|
|
3746
|
+
...filter,
|
|
3747
|
+
limit: 0
|
|
3748
|
+
});
|
|
3749
|
+
(0, import_vitest9.expect)(seen).toEqual([]);
|
|
3750
|
+
(0, import_vitest9.expect)(count).toBe(0);
|
|
3751
|
+
});
|
|
3703
3752
|
(0, import_vitest9.it)("returns positions filtered by stream regex, exact, source, and source_exact", async () => {
|
|
3704
3753
|
const tag = uid();
|
|
3705
3754
|
const proj1 = `qs-${tag}-projection-tickets`;
|
|
@@ -3837,6 +3886,21 @@ var runStoreTck = (options) => {
|
|
|
3837
3886
|
const unknown = await store.query_stats([`qst-${tag}-missing`]);
|
|
3838
3887
|
(0, import_vitest9.expect)(unknown.size).toBe(0);
|
|
3839
3888
|
});
|
|
3889
|
+
(0, import_vitest9.it)("limit: 0 returns no rows", async () => {
|
|
3890
|
+
const s = `qst-zero-${uid()}`;
|
|
3891
|
+
await store.commit(
|
|
3892
|
+
s,
|
|
3893
|
+
[inc(1)],
|
|
3894
|
+
make_meta({ stream: s })
|
|
3895
|
+
);
|
|
3896
|
+
const filter = { stream: s, stream_exact: true };
|
|
3897
|
+
const control = await store.query_stats(filter);
|
|
3898
|
+
(0, import_vitest9.expect)(control.size).toBe(1);
|
|
3899
|
+
const stats = await store.query_stats(filter, {
|
|
3900
|
+
limit: 0
|
|
3901
|
+
});
|
|
3902
|
+
(0, import_vitest9.expect)(stats.size).toBe(0);
|
|
3903
|
+
});
|
|
3840
3904
|
(0, import_vitest9.it)("keyset pagination visits every stream regardless of name case (#1357)", async () => {
|
|
3841
3905
|
const tag = uid();
|
|
3842
3906
|
const names = [
|