@rotorsoft/act-tck 1.27.39 → 1.27.40
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 +28 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2951,6 +2951,34 @@ var runStoreTck = (options) => {
|
|
|
2951
2951
|
});
|
|
2952
2952
|
});
|
|
2953
2953
|
describe8("truncate", () => {
|
|
2954
|
+
it7("keeps the subscription row for a restart target, drops it for a retire (#1398)", async () => {
|
|
2955
|
+
const tag = uid();
|
|
2956
|
+
const restarted = `trunc-restart-${tag}`;
|
|
2957
|
+
const retired = `trunc-retire-${tag}`;
|
|
2958
|
+
for (const s of [restarted, retired]) {
|
|
2959
|
+
await store.subscribe([{ stream: s }]);
|
|
2960
|
+
await store.commit(
|
|
2961
|
+
s,
|
|
2962
|
+
[inc(1)],
|
|
2963
|
+
make_meta({ stream: s })
|
|
2964
|
+
);
|
|
2965
|
+
}
|
|
2966
|
+
await store.truncate([
|
|
2967
|
+
{
|
|
2968
|
+
stream: restarted,
|
|
2969
|
+
snapshot: { count: 1 },
|
|
2970
|
+
meta: make_meta({ stream: restarted })
|
|
2971
|
+
},
|
|
2972
|
+
{ stream: retired, meta: make_meta({ stream: retired }) }
|
|
2973
|
+
]);
|
|
2974
|
+
const rows = [];
|
|
2975
|
+
await store.query_streams((p) => rows.push(p.stream), {
|
|
2976
|
+
stream: `trunc-.*-${tag}`,
|
|
2977
|
+
limit: 100
|
|
2978
|
+
});
|
|
2979
|
+
expect8(rows).toContain(restarted);
|
|
2980
|
+
expect8(rows).not.toContain(retired);
|
|
2981
|
+
});
|
|
2954
2982
|
it7("seeds a tombstone when no snapshot is provided", async () => {
|
|
2955
2983
|
const s = `trunc-tomb-${uid()}`;
|
|
2956
2984
|
await store.commit(
|