@rotorsoft/act-tck 1.36.17 → 1.36.18
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 +44 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +44 -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,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,IA88JtD,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -3213,6 +3213,50 @@ var runStoreTck = (options) => {
|
|
|
3213
3213
|
});
|
|
3214
3214
|
(0, import_vitest9.expect)(seen).toEqual(["fast"]);
|
|
3215
3215
|
});
|
|
3216
|
+
(0, import_vitest9.it)("keeps the lane when a lower-priority subscribe re-registers", async () => {
|
|
3217
|
+
const s = `lane-rank-${uid()}`;
|
|
3218
|
+
await store.subscribe([{ stream: s, lane: "fast", priority: 10 }]);
|
|
3219
|
+
await store.subscribe([{ stream: s, lane: "slow", priority: 0 }]);
|
|
3220
|
+
const seen = [];
|
|
3221
|
+
await store.query_streams(
|
|
3222
|
+
(p) => seen.push({ lane: p.lane, priority: p.priority }),
|
|
3223
|
+
{ stream: s, stream_exact: true }
|
|
3224
|
+
);
|
|
3225
|
+
(0, import_vitest9.expect)(seen).toEqual([{ lane: "fast", priority: 10 }]);
|
|
3226
|
+
});
|
|
3227
|
+
(0, import_vitest9.it)("keeps the lane when a mark-only subscribe re-registers", async () => {
|
|
3228
|
+
const s = `lane-mark-${uid()}`;
|
|
3229
|
+
await store.subscribe([{ stream: s, lane: "fast", priority: 10 }]);
|
|
3230
|
+
await store.subscribe([{ stream: s, correlated_at: 7 }]);
|
|
3231
|
+
const seen = [];
|
|
3232
|
+
await store.query_streams(
|
|
3233
|
+
(p) => seen.push({ lane: p.lane, correlated_at: p.correlated_at }),
|
|
3234
|
+
{ stream: s, stream_exact: true }
|
|
3235
|
+
);
|
|
3236
|
+
(0, import_vitest9.expect)(seen).toEqual([{ lane: "fast", correlated_at: 7 }]);
|
|
3237
|
+
});
|
|
3238
|
+
(0, import_vitest9.it)("re-lanes when the subscribe outranks the stored priority", async () => {
|
|
3239
|
+
const s = `lane-outrank-${uid()}`;
|
|
3240
|
+
await store.subscribe([{ stream: s, lane: "fast", priority: 0 }]);
|
|
3241
|
+
await store.subscribe([{ stream: s, lane: "slow", priority: 5 }]);
|
|
3242
|
+
const seen = [];
|
|
3243
|
+
await store.query_streams(
|
|
3244
|
+
(p) => seen.push({ lane: p.lane, priority: p.priority }),
|
|
3245
|
+
{ stream: s, stream_exact: true }
|
|
3246
|
+
);
|
|
3247
|
+
(0, import_vitest9.expect)(seen).toEqual([{ lane: "slow", priority: 5 }]);
|
|
3248
|
+
});
|
|
3249
|
+
(0, import_vitest9.it)("re-lanes at equal priority, which is what keeps re-laning restart-driven", async () => {
|
|
3250
|
+
const s = `lane-equal-${uid()}`;
|
|
3251
|
+
await store.subscribe([{ stream: s, lane: "fast", priority: 7 }]);
|
|
3252
|
+
await store.subscribe([{ stream: s, lane: "slow", priority: 7 }]);
|
|
3253
|
+
const seen = [];
|
|
3254
|
+
await store.query_streams((p) => seen.push(p.lane), {
|
|
3255
|
+
stream: s,
|
|
3256
|
+
stream_exact: true
|
|
3257
|
+
});
|
|
3258
|
+
(0, import_vitest9.expect)(seen).toEqual(["slow"]);
|
|
3259
|
+
});
|
|
3216
3260
|
(0, import_vitest9.it)("claim() filters by lane when supplied and returns lane on the Lease", async () => {
|
|
3217
3261
|
const tag = uid();
|
|
3218
3262
|
const src1 = `lane-claim-src1-${tag}`;
|