@rotorsoft/act-tck 1.38.18 → 1.38.20
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/index.cjs +18 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2150,7 +2150,7 @@ var runStoreTck = (options) => {
|
|
|
2150
2150
|
const second = await store.claim(0, 100, `w-${uid()}`, 1);
|
|
2151
2151
|
expect8(second.find((l) => l.stream === s)).toBeDefined();
|
|
2152
2152
|
});
|
|
2153
|
-
it7("does not starve a default-priority lagging stream under sustained high-priority load
|
|
2153
|
+
it7("does not starve a default-priority lagging stream under sustained high-priority load", async () => {
|
|
2154
2154
|
const fresh = await options.factory();
|
|
2155
2155
|
try {
|
|
2156
2156
|
await fresh.drop();
|
|
@@ -2552,7 +2552,7 @@ var runStoreTck = (options) => {
|
|
|
2552
2552
|
const again = await store.claim(100, 100, `w2-${uid()}`, 1e5);
|
|
2553
2553
|
expect8(again.find((l) => l.stream === s)).toBeUndefined();
|
|
2554
2554
|
});
|
|
2555
|
-
it7("returns the post-block row, not the caller's lease
|
|
2555
|
+
it7("returns the post-block row, not the caller's lease", async () => {
|
|
2556
2556
|
const s = `block-returns-${uid()}`;
|
|
2557
2557
|
await store.subscribe([{ stream: s }]);
|
|
2558
2558
|
await store.commit(
|
|
@@ -2597,7 +2597,7 @@ var runStoreTck = (options) => {
|
|
|
2597
2597
|
]);
|
|
2598
2598
|
expect8(blocked).toHaveLength(0);
|
|
2599
2599
|
});
|
|
2600
|
-
it7("re-blocking an already-blocked stream is a no-op
|
|
2600
|
+
it7("re-blocking an already-blocked stream is a no-op", async () => {
|
|
2601
2601
|
const s = `block-twice-${uid()}`;
|
|
2602
2602
|
await store.subscribe([{ stream: s }]);
|
|
2603
2603
|
await store.commit(
|
|
@@ -2715,7 +2715,7 @@ var runStoreTck = (options) => {
|
|
|
2715
2715
|
const leased = await store.claim(100, 100, `w-${uid()}`, 1e5);
|
|
2716
2716
|
expect8(leased.find((l) => l.stream === s)).toBeDefined();
|
|
2717
2717
|
});
|
|
2718
|
-
it7("exposes a future deferred_at via query_streams
|
|
2718
|
+
it7("exposes a future deferred_at via query_streams", async () => {
|
|
2719
2719
|
const deferred = `defer-qs-${uid()}`;
|
|
2720
2720
|
const plain = `defer-qs-plain-${uid()}`;
|
|
2721
2721
|
await store.subscribe([{ stream: deferred }, { stream: plain }]);
|
|
@@ -2770,7 +2770,7 @@ var runStoreTck = (options) => {
|
|
|
2770
2770
|
expect8(await store.defer([`missing-${uid()}`], Date.now())).toBe(0);
|
|
2771
2771
|
expect8(await store.defer([], Date.now())).toBe(0);
|
|
2772
2772
|
});
|
|
2773
|
-
it7("counts a duplicated stream name once
|
|
2773
|
+
it7("counts a duplicated stream name once", async () => {
|
|
2774
2774
|
const s = `defer-dup-${uid()}`;
|
|
2775
2775
|
await store.subscribe([{ stream: s }]);
|
|
2776
2776
|
await store.commit(
|
|
@@ -2836,7 +2836,7 @@ var runStoreTck = (options) => {
|
|
|
2836
2836
|
expect8(re.retry).toBe(0);
|
|
2837
2837
|
await store.ack([{ ...re, at: 1e6 }]);
|
|
2838
2838
|
});
|
|
2839
|
-
it7("persists the lease's retry on a backoff-style due lease
|
|
2839
|
+
it7("persists the lease's retry on a backoff-style due lease", async () => {
|
|
2840
2840
|
const s = `ackdefer-retry-${uid()}`;
|
|
2841
2841
|
await store.subscribe([{ stream: s }]);
|
|
2842
2842
|
await store.commit(
|
|
@@ -2856,7 +2856,7 @@ var runStoreTck = (options) => {
|
|
|
2856
2856
|
expect8(re.retry).toBe(4);
|
|
2857
2857
|
await store.ack([{ ...re, at: 1e6 }]);
|
|
2858
2858
|
});
|
|
2859
|
-
it7("advances the watermark to `at` while persisting the schedule on a partial-progress due lease
|
|
2859
|
+
it7("advances the watermark to `at` while persisting the schedule on a partial-progress due lease", async () => {
|
|
2860
2860
|
const s = `ackadvance-${uid()}`;
|
|
2861
2861
|
await store.subscribe([{ stream: s }]);
|
|
2862
2862
|
const [e1] = await store.commit(
|
|
@@ -2946,7 +2946,7 @@ var runStoreTck = (options) => {
|
|
|
2946
2946
|
expect8(await store.reset([`missing-${uid()}`])).toBe(0);
|
|
2947
2947
|
expect8(await store.reset([])).toBe(0);
|
|
2948
2948
|
});
|
|
2949
|
-
it7("counts a duplicated stream name once
|
|
2949
|
+
it7("counts a duplicated stream name once", async () => {
|
|
2950
2950
|
const s = `reset-dup-${uid()}`;
|
|
2951
2951
|
await store.subscribe([{ stream: s }]);
|
|
2952
2952
|
await store.commit(
|
|
@@ -3431,7 +3431,7 @@ var runStoreTck = (options) => {
|
|
|
3431
3431
|
});
|
|
3432
3432
|
});
|
|
3433
3433
|
describe8("long identifiers", () => {
|
|
3434
|
-
it7("accepts a stream name well past 100 characters
|
|
3434
|
+
it7("accepts a stream name well past 100 characters", async () => {
|
|
3435
3435
|
const tag = uid();
|
|
3436
3436
|
const long = `${tag}-${"x".repeat(140)}`;
|
|
3437
3437
|
await store.commit(
|
|
@@ -3454,7 +3454,7 @@ var runStoreTck = (options) => {
|
|
|
3454
3454
|
});
|
|
3455
3455
|
});
|
|
3456
3456
|
describe8("truncate", () => {
|
|
3457
|
-
it7("leaves subscriptions untouched for restart and retire alike
|
|
3457
|
+
it7("leaves subscriptions untouched for restart and retire alike", async () => {
|
|
3458
3458
|
const tag = uid();
|
|
3459
3459
|
const restarted = `trunc-restart-${tag}`;
|
|
3460
3460
|
const retired = `trunc-retire-${tag}`;
|
|
@@ -3482,7 +3482,7 @@ var runStoreTck = (options) => {
|
|
|
3482
3482
|
expect8(rows).toContain(restarted);
|
|
3483
3483
|
expect8(rows).toContain(retired);
|
|
3484
3484
|
});
|
|
3485
|
-
it7("leaves a retired stream's surviving subscription unclaimable
|
|
3485
|
+
it7("leaves a retired stream's surviving subscription unclaimable", async () => {
|
|
3486
3486
|
const lane = `inert-lane-${uid()}`;
|
|
3487
3487
|
const s = `trunc-inert-${uid()}`;
|
|
3488
3488
|
const [e] = await store.commit(
|
|
@@ -3544,7 +3544,7 @@ var runStoreTck = (options) => {
|
|
|
3544
3544
|
);
|
|
3545
3545
|
expect8(remaining[0].data).toEqual({ count: 7 });
|
|
3546
3546
|
});
|
|
3547
|
-
it7("leaves exactly one seed when a stream is listed twice
|
|
3547
|
+
it7("leaves exactly one seed when a stream is listed twice", async () => {
|
|
3548
3548
|
const s = `trunc-dup-${uid()}`;
|
|
3549
3549
|
await store.commit(
|
|
3550
3550
|
s,
|
|
@@ -3566,7 +3566,7 @@ var runStoreTck = (options) => {
|
|
|
3566
3566
|
expect8(remaining[0].data).toEqual({ count: 2 });
|
|
3567
3567
|
expect8(result.get(s)?.deleted).toBe(1);
|
|
3568
3568
|
});
|
|
3569
|
-
it7("applies windowed targets before full ones
|
|
3569
|
+
it7("applies windowed targets before full ones", async () => {
|
|
3570
3570
|
const s = `trunc-mix-${uid()}`;
|
|
3571
3571
|
await store.commit(
|
|
3572
3572
|
s,
|
|
@@ -3770,7 +3770,7 @@ var runStoreTck = (options) => {
|
|
|
3770
3770
|
});
|
|
3771
3771
|
});
|
|
3772
3772
|
describe8("query_streams", () => {
|
|
3773
|
-
it7("keyset pagination visits every stream regardless of name case
|
|
3773
|
+
it7("keyset pagination visits every stream regardless of name case", async () => {
|
|
3774
3774
|
const tag = uid();
|
|
3775
3775
|
const names = [
|
|
3776
3776
|
`${tag}-Bravo`,
|
|
@@ -3965,7 +3965,7 @@ var runStoreTck = (options) => {
|
|
|
3965
3965
|
});
|
|
3966
3966
|
expect8(stats.size).toBe(0);
|
|
3967
3967
|
});
|
|
3968
|
-
it7("keyset pagination visits every stream regardless of name case
|
|
3968
|
+
it7("keyset pagination visits every stream regardless of name case", async () => {
|
|
3969
3969
|
const tag = uid();
|
|
3970
3970
|
const names = [
|
|
3971
3971
|
`${tag}-Bravo`,
|
|
@@ -5026,7 +5026,7 @@ var runStoreTck = (options) => {
|
|
|
5026
5026
|
expect8(seen[0].pii).toEqual({ email: "u@example.com", name: "Ursula" });
|
|
5027
5027
|
expect8(seen[0].data).toEqual({ amount: 1 });
|
|
5028
5028
|
});
|
|
5029
|
-
describe8("with_pii
|
|
5029
|
+
describe8("with_pii", () => {
|
|
5030
5030
|
const seed_pii = async (s) => await store.commit(
|
|
5031
5031
|
s,
|
|
5032
5032
|
[
|
|
@@ -5090,7 +5090,7 @@ var runStoreTck = (options) => {
|
|
|
5090
5090
|
for (const e of seen) expect8(e.pii ?? null).toBeNull();
|
|
5091
5091
|
});
|
|
5092
5092
|
});
|
|
5093
|
-
it7("round-trips a Date losslessly in pii, like data/meta
|
|
5093
|
+
it7("round-trips a Date losslessly in pii, like data/meta", async () => {
|
|
5094
5094
|
const s = `pii-date-${uid()}`;
|
|
5095
5095
|
const when = /* @__PURE__ */ new Date("2024-03-01T10:20:30.000Z");
|
|
5096
5096
|
await store.commit(
|
|
@@ -5119,7 +5119,7 @@ var runStoreTck = (options) => {
|
|
|
5119
5119
|
expect8(recovered(born)).toBe(when.getTime());
|
|
5120
5120
|
expect8(typeof at).toBe(typeof born);
|
|
5121
5121
|
});
|
|
5122
|
-
it7("query_stats head/tail never carry pii \u2014 introspection surface is pii-safe
|
|
5122
|
+
it7("query_stats head/tail never carry pii \u2014 introspection surface is pii-safe", async () => {
|
|
5123
5123
|
const s = `pii-stats-${uid()}`;
|
|
5124
5124
|
await store.commit(
|
|
5125
5125
|
s,
|