@rotorsoft/act-tck 1.27.39 → 1.27.41
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 +51 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-tck.d.ts","sourceRoot":"","sources":["../../src/store-tck.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAQV,KAAK,EAEN,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;;;;;;;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;CACrD,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;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,iB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dist/index.cjs
CHANGED
|
@@ -2997,7 +2997,58 @@ var runStoreTck = (options) => {
|
|
|
2997
2997
|
(0, import_vitest9.expect)(blocked.get(b)).toBe(true);
|
|
2998
2998
|
});
|
|
2999
2999
|
});
|
|
3000
|
+
(0, import_vitest9.describe)("long identifiers", () => {
|
|
3001
|
+
(0, import_vitest9.it)("accepts a stream name well past 100 characters (#1420)", async () => {
|
|
3002
|
+
const tag = uid();
|
|
3003
|
+
const long = `${tag}-${"x".repeat(140)}`;
|
|
3004
|
+
await store.commit(
|
|
3005
|
+
long,
|
|
3006
|
+
[inc(1)],
|
|
3007
|
+
make_meta({ stream: long })
|
|
3008
|
+
);
|
|
3009
|
+
await store.subscribe([
|
|
3010
|
+
{ stream: `__autoclose__:${long}`, source: long }
|
|
3011
|
+
]);
|
|
3012
|
+
const seen = [];
|
|
3013
|
+
await store.query((e) => seen.push(e.stream), {
|
|
3014
|
+
stream: long,
|
|
3015
|
+
stream_exact: true
|
|
3016
|
+
});
|
|
3017
|
+
(0, import_vitest9.expect)(seen).toEqual([long]);
|
|
3018
|
+
const subs = [];
|
|
3019
|
+
await store.query_streams((p) => subs.push(p.stream), { limit: 500 });
|
|
3020
|
+
(0, import_vitest9.expect)(subs).toContain(`__autoclose__:${long}`);
|
|
3021
|
+
});
|
|
3022
|
+
});
|
|
3000
3023
|
(0, import_vitest9.describe)("truncate", () => {
|
|
3024
|
+
(0, import_vitest9.it)("keeps the subscription row for a restart target, drops it for a retire (#1398)", async () => {
|
|
3025
|
+
const tag = uid();
|
|
3026
|
+
const restarted = `trunc-restart-${tag}`;
|
|
3027
|
+
const retired = `trunc-retire-${tag}`;
|
|
3028
|
+
for (const s of [restarted, retired]) {
|
|
3029
|
+
await store.subscribe([{ stream: s }]);
|
|
3030
|
+
await store.commit(
|
|
3031
|
+
s,
|
|
3032
|
+
[inc(1)],
|
|
3033
|
+
make_meta({ stream: s })
|
|
3034
|
+
);
|
|
3035
|
+
}
|
|
3036
|
+
await store.truncate([
|
|
3037
|
+
{
|
|
3038
|
+
stream: restarted,
|
|
3039
|
+
snapshot: { count: 1 },
|
|
3040
|
+
meta: make_meta({ stream: restarted })
|
|
3041
|
+
},
|
|
3042
|
+
{ stream: retired, meta: make_meta({ stream: retired }) }
|
|
3043
|
+
]);
|
|
3044
|
+
const rows = [];
|
|
3045
|
+
await store.query_streams((p) => rows.push(p.stream), {
|
|
3046
|
+
stream: `trunc-.*-${tag}`,
|
|
3047
|
+
limit: 100
|
|
3048
|
+
});
|
|
3049
|
+
(0, import_vitest9.expect)(rows).toContain(restarted);
|
|
3050
|
+
(0, import_vitest9.expect)(rows).not.toContain(retired);
|
|
3051
|
+
});
|
|
3001
3052
|
(0, import_vitest9.it)("seeds a tombstone when no snapshot is provided", async () => {
|
|
3002
3053
|
const s = `trunc-tomb-${uid()}`;
|
|
3003
3054
|
await store.commit(
|