@rotorsoft/act-tck 1.38.23 → 1.38.25

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/index.js CHANGED
@@ -384,6 +384,8 @@ ${content}`;
384
384
  // src/store-differential-tck.ts
385
385
  import { SNAP_EVENT } from "@rotorsoft/act";
386
386
  import { afterAll as afterAll2, beforeAll as beforeAll2, describe as describe6, expect as expect6, it as it6 } from "vitest";
387
+
388
+ // src/fixtures/mark-all.ts
387
389
  var mark_all = async (store) => {
388
390
  const rows = [];
389
391
  const { maxEventId } = await store.query_streams(
@@ -402,6 +404,8 @@ var mark_all = async (store) => {
402
404
  }));
403
405
  await store.subscribe(marks);
404
406
  };
407
+
408
+ // src/store-differential-tck.ts
405
409
  var mulberry322 = (seed) => {
406
410
  let a = seed >>> 0;
407
411
  return () => {
@@ -875,24 +879,6 @@ var runStoreDifferentialTck = (options) => {
875
879
  // src/store-property-tck.ts
876
880
  import { fc, test } from "@fast-check/vitest";
877
881
  import { afterAll as afterAll3, beforeAll as beforeAll3, describe as describe7, expect as expect7 } from "vitest";
878
- var mark_all2 = async (store) => {
879
- const rows = [];
880
- const { maxEventId } = await store.query_streams(
881
- (p) => rows.push({
882
- stream: p.stream,
883
- at: p.at,
884
- priority: p.priority,
885
- lane: p.lane
886
- })
887
- );
888
- const marks = rows.filter((r) => r.at < maxEventId).map((r) => ({
889
- stream: r.stream,
890
- priority: r.priority,
891
- lane: r.lane,
892
- correlated_at: maxEventId
893
- }));
894
- await store.subscribe(marks);
895
- };
896
882
  var streamArb = fc.constantFrom("s1", "s2", "s3");
897
883
  var commitArb = fc.record({
898
884
  stream: streamArb,
@@ -1003,7 +989,7 @@ var runStorePropertyTck = (options) => {
1003
989
  make_meta({ stream: op.stream })
1004
990
  );
1005
991
  } else if (op.kind === "claim") {
1006
- await mark_all2(store);
992
+ await mark_all(store);
1007
993
  const claimed = await store.claim(5, 5, "worker", 6e4);
1008
994
  totalClaims += claimed.length;
1009
995
  pending = [...pending, ...claimed];
@@ -1046,7 +1032,7 @@ var runStorePropertyTck = (options) => {
1046
1032
  make_meta({ stream })
1047
1033
  );
1048
1034
  }
1049
- await mark_all2(store);
1035
+ await mark_all(store);
1050
1036
  const acked1 = await store.ack(
1051
1037
  await store.claim(10, 10, "worker", 6e4)
1052
1038
  );
@@ -1059,7 +1045,7 @@ var runStorePropertyTck = (options) => {
1059
1045
  make_meta({ stream })
1060
1046
  );
1061
1047
  }
1062
- await mark_all2(store);
1048
+ await mark_all(store);
1063
1049
  const acked2 = await store.ack(
1064
1050
  await store.claim(10, 10, "worker", 6e4)
1065
1051
  );
@@ -1086,7 +1072,7 @@ var runStorePropertyTck = (options) => {
1086
1072
  make_meta({ stream })
1087
1073
  );
1088
1074
  }
1089
- await mark_all2(store);
1075
+ await mark_all(store);
1090
1076
  const claimed = await store.claim(10, 10, "worker", 6e4);
1091
1077
  await store.block(claimed.map((l) => ({ ...l, error: "test" })));
1092
1078
  const blockedSet = new Set(claimed.map((l) => l.stream));
@@ -1096,7 +1082,7 @@ var runStorePropertyTck = (options) => {
1096
1082
  [inc(1)],
1097
1083
  make_meta({ stream: "ctrl" })
1098
1084
  );
1099
- await mark_all2(store);
1085
+ await mark_all(store);
1100
1086
  const reclaim = await store.claim(10, 10, "worker2", 6e4);
1101
1087
  for (const l of reclaim) expect7(blockedSet.has(l.stream)).toBe(false);
1102
1088
  },