@rotorsoft/act-tck 1.27.9 → 1.27.11
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 +26 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2398,6 +2398,32 @@ var runStoreTck = (options) => {
|
|
|
2398
2398
|
expect8(re.retry).toBe(4);
|
|
2399
2399
|
await store.ack([{ ...re, at: 1e6 }]);
|
|
2400
2400
|
});
|
|
2401
|
+
it7("advances the watermark to `at` while persisting the schedule on a partial-progress due lease (#1278)", async () => {
|
|
2402
|
+
const s = `ackadvance-${uid()}`;
|
|
2403
|
+
await store.subscribe([{ stream: s }]);
|
|
2404
|
+
const [e1] = await store.commit(
|
|
2405
|
+
s,
|
|
2406
|
+
[inc(1)],
|
|
2407
|
+
make_meta({ stream: s })
|
|
2408
|
+
);
|
|
2409
|
+
await store.commit(
|
|
2410
|
+
s,
|
|
2411
|
+
[inc(1)],
|
|
2412
|
+
make_meta({ stream: s })
|
|
2413
|
+
);
|
|
2414
|
+
const leased = await store.claim(100, 100, `w-${uid()}`, 1e5);
|
|
2415
|
+
const mine = leased.find((l) => l.stream === s);
|
|
2416
|
+
expect8(mine.at).toBeLessThan(e1.id);
|
|
2417
|
+
await store.ack([
|
|
2418
|
+
{ ...mine, at: e1.id, due: Date.now() - 1e3, retry: 2 }
|
|
2419
|
+
]);
|
|
2420
|
+
const again = await store.claim(100, 100, `w-${uid()}`, 1e5);
|
|
2421
|
+
const re = again.find((l) => l.stream === s);
|
|
2422
|
+
expect8(re).toBeDefined();
|
|
2423
|
+
expect8(re.at).toBe(e1.id);
|
|
2424
|
+
expect8(re.retry).toBe(3);
|
|
2425
|
+
await store.ack([{ ...re, at: 1e6 }]);
|
|
2426
|
+
});
|
|
2401
2427
|
it7("ignores due-marked entries from a non-holder", async () => {
|
|
2402
2428
|
const s = `ackdefer-owner-${uid()}`;
|
|
2403
2429
|
await store.subscribe([{ stream: s }]);
|