@open-mercato/cache 0.11.1-develop.8593.1.50784dae35 → 0.11.1-develop.8665.1.2455b2503c
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/.turbo/turbo-build.log +1 -1
- package/AGENTS.md +27 -21
- package/README.md +30 -0
- package/dist/codec.js +1 -74
- package/dist/codec.js.map +2 -2
- package/dist/defaults.js +1 -6
- package/dist/defaults.js.map +2 -2
- package/dist/errors.js +1 -12
- package/dist/errors.js.map +2 -2
- package/dist/index.js.map +1 -1
- package/dist/patterns.js +1 -35
- package/dist/patterns.js.map +2 -2
- package/dist/provider.js +440 -0
- package/dist/provider.js.map +7 -0
- package/dist/redisConnection.js +2 -0
- package/dist/redisConnection.js.map +7 -0
- package/dist/service.js +320 -80
- package/dist/service.js.map +3 -3
- package/dist/strategies/jsonfile.js +1 -186
- package/dist/strategies/jsonfile.js.map +3 -3
- package/dist/strategies/memory.js +1 -196
- package/dist/strategies/memory.js.map +3 -3
- package/dist/strategies/redis.js +1 -443
- package/dist/strategies/redis.js.map +3 -3
- package/dist/strategies/sqlite.js +1 -196
- package/dist/strategies/sqlite.js.map +3 -3
- package/dist/testing/conformance.js +448 -0
- package/dist/testing/conformance.js.map +7 -0
- package/dist/testing/index.js +12 -0
- package/dist/testing/index.js.map +7 -0
- package/dist/testing/remote.js +182 -0
- package/dist/testing/remote.js.map +7 -0
- package/fixtures/build-conformance-host.mjs +58 -0
- package/fixtures/cache-provider-fixture/index.d.ts +18 -0
- package/fixtures/cache-provider-fixture/index.js +307 -0
- package/fixtures/cache-provider-fixture/package.json +25 -0
- package/fixtures/conformance-child.mjs +41 -0
- package/jest.config.cjs +3 -1
- package/package.json +10 -2
- package/src/__tests__/cache-di-contract-docs.test.ts +2 -2
- package/src/__tests__/conformance.memory-provider.test.ts +77 -0
- package/src/__tests__/provider-fixture.packed.test.ts +178 -0
- package/src/__tests__/provider.test.ts +469 -0
- package/src/__tests__/service.provider.test.ts +513 -0
- package/src/__tests__/service.test.ts +94 -3
- package/src/codec.ts +1 -94
- package/src/defaults.ts +1 -2
- package/src/errors.ts +1 -14
- package/src/index.ts +4 -0
- package/src/patterns.ts +1 -40
- package/src/provider.ts +641 -0
- package/src/redisConnection.ts +1 -0
- package/src/service.ts +396 -89
- package/src/strategies/jsonfile.ts +1 -242
- package/src/strategies/memory.ts +1 -275
- package/src/strategies/redis.ts +1 -615
- package/src/strategies/sqlite.ts +1 -292
- package/src/testing/conformance.ts +569 -0
- package/src/testing/index.ts +11 -0
- package/src/testing/remote.ts +240 -0
- package/src/types.ts +8 -106
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { randomBytes } from "node:crypto";
|
|
3
|
+
import { runWithCacheTenant } from "../tenantContext.js";
|
|
4
|
+
import { validateCacheProviderNamespace } from "../provider.js";
|
|
5
|
+
import { resolvePhysicalCacheValueKey } from "../service.js";
|
|
6
|
+
function resolveTestRunner() {
|
|
7
|
+
const scope = globalThis;
|
|
8
|
+
if (typeof scope.describe !== "function" || typeof scope.it !== "function") {
|
|
9
|
+
throw new Error("[internal] defineCacheProviderConformance requires jest-compatible describe/it globals");
|
|
10
|
+
}
|
|
11
|
+
return { describe: scope.describe, it: scope.it };
|
|
12
|
+
}
|
|
13
|
+
const DEFAULT_BATCH_SIZE = 600;
|
|
14
|
+
const DEFAULT_TTL_MS = 150;
|
|
15
|
+
const DEFAULT_TTL_GRACE_MS = 100;
|
|
16
|
+
const DEFAULT_TEST_TIMEOUT_MS = 12e4;
|
|
17
|
+
const WRITE_CONCURRENCY = 25;
|
|
18
|
+
function sleep(ms) {
|
|
19
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
20
|
+
}
|
|
21
|
+
function randomNamespace(prefix = "conf") {
|
|
22
|
+
const safePrefix = prefix.replace(/[^a-zA-Z0-9._-]/g, "_").slice(0, 40) || "conf";
|
|
23
|
+
return validateCacheProviderNamespace(`${safePrefix}-${randomBytes(6).toString("hex")}`);
|
|
24
|
+
}
|
|
25
|
+
function randomTenant(label) {
|
|
26
|
+
return `${label}-${randomBytes(4).toString("hex")}`;
|
|
27
|
+
}
|
|
28
|
+
function conformancePhysicalValueKey(key, tenant) {
|
|
29
|
+
return resolvePhysicalCacheValueKey(key, tenant);
|
|
30
|
+
}
|
|
31
|
+
function inCacheTenant(tenant, fn) {
|
|
32
|
+
return runWithCacheTenant(tenant, fn);
|
|
33
|
+
}
|
|
34
|
+
async function withConformanceNamespace(createService, body, options = {}) {
|
|
35
|
+
const namespace = randomNamespace(options.prefix);
|
|
36
|
+
const namespaces = /* @__PURE__ */ new Set([namespace]);
|
|
37
|
+
const tenants = /* @__PURE__ */ new Set([null]);
|
|
38
|
+
const services = [];
|
|
39
|
+
const remotes = [];
|
|
40
|
+
const context = {
|
|
41
|
+
namespace,
|
|
42
|
+
async open(openOptions = {}) {
|
|
43
|
+
const target = openOptions.namespace ?? namespace;
|
|
44
|
+
namespaces.add(target);
|
|
45
|
+
const service = await createService(target, openOptions.defaultTtl !== void 0 ? { defaultTtl: openOptions.defaultTtl } : void 0);
|
|
46
|
+
services.push(service);
|
|
47
|
+
return service;
|
|
48
|
+
},
|
|
49
|
+
foreignNamespace() {
|
|
50
|
+
const foreign = randomNamespace(options.prefix);
|
|
51
|
+
namespaces.add(foreign);
|
|
52
|
+
return foreign;
|
|
53
|
+
},
|
|
54
|
+
tenant(label) {
|
|
55
|
+
const tenant = randomTenant(label);
|
|
56
|
+
tenants.add(tenant);
|
|
57
|
+
return tenant;
|
|
58
|
+
},
|
|
59
|
+
track(remote) {
|
|
60
|
+
remotes.push(remote);
|
|
61
|
+
return remote;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
try {
|
|
65
|
+
return await body(context);
|
|
66
|
+
} finally {
|
|
67
|
+
for (const remote of remotes) {
|
|
68
|
+
await remote.close().catch(() => void 0);
|
|
69
|
+
}
|
|
70
|
+
for (const target of namespaces) {
|
|
71
|
+
let cleaner = null;
|
|
72
|
+
try {
|
|
73
|
+
cleaner = await createService(target);
|
|
74
|
+
for (const tenant of tenants) {
|
|
75
|
+
await runWithCacheTenant(tenant, () => cleaner.clear()).catch(() => void 0);
|
|
76
|
+
}
|
|
77
|
+
} catch {
|
|
78
|
+
} finally {
|
|
79
|
+
await cleaner?.close?.().catch(() => void 0);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
for (const service of services) {
|
|
83
|
+
await service.close?.().catch(() => void 0);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
async function assertCacheHit(service, key, expected, message) {
|
|
88
|
+
assert.deepEqual(await service.get(key), expected, message ?? `expected cache hit for "${key}"`);
|
|
89
|
+
assert.equal(await service.has(key), true, message ?? `expected has("${key}") to be true`);
|
|
90
|
+
}
|
|
91
|
+
async function assertCacheMiss(service, key, message) {
|
|
92
|
+
assert.equal(await service.get(key), null, message ?? `expected cache miss for "${key}"`);
|
|
93
|
+
assert.equal(await service.has(key), false, message ?? `expected has("${key}") to be false`);
|
|
94
|
+
}
|
|
95
|
+
function sorted(values) {
|
|
96
|
+
return [...values].sort((left, right) => left < right ? -1 : left > right ? 1 : 0);
|
|
97
|
+
}
|
|
98
|
+
async function writeInChunks(count, write) {
|
|
99
|
+
for (let start = 0; start < count; start += WRITE_CONCURRENCY) {
|
|
100
|
+
const end = Math.min(count, start + WRITE_CONCURRENCY);
|
|
101
|
+
const batch = [];
|
|
102
|
+
for (let index = start; index < end; index++) batch.push(write(index));
|
|
103
|
+
await Promise.all(batch);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function runRemote(remote, operation) {
|
|
107
|
+
return remote.run(operation);
|
|
108
|
+
}
|
|
109
|
+
async function settleWithin(promise, ms) {
|
|
110
|
+
let timer = null;
|
|
111
|
+
const timeout = new Promise((_, reject) => {
|
|
112
|
+
timer = setTimeout(() => reject(new Error(`[internal] operation did not settle within ${ms}ms`)), ms);
|
|
113
|
+
});
|
|
114
|
+
try {
|
|
115
|
+
const value = await Promise.race([promise, timeout]);
|
|
116
|
+
return { status: "fulfilled", value };
|
|
117
|
+
} catch (reason) {
|
|
118
|
+
if (reason instanceof Error && reason.message.startsWith("[internal] operation did not settle")) throw reason;
|
|
119
|
+
return { status: "rejected", reason };
|
|
120
|
+
} finally {
|
|
121
|
+
if (timer) clearTimeout(timer);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
function defineCacheProviderConformance(options) {
|
|
125
|
+
const { describe, it } = resolveTestRunner();
|
|
126
|
+
const batchSize = options.batchSize ?? DEFAULT_BATCH_SIZE;
|
|
127
|
+
const ttlMs = options.ttlMs ?? DEFAULT_TTL_MS;
|
|
128
|
+
const ttlGraceMs = options.ttlGraceMs ?? DEFAULT_TTL_GRACE_MS;
|
|
129
|
+
const timeout = options.testTimeoutMs ?? DEFAULT_TEST_TIMEOUT_MS;
|
|
130
|
+
const supportsReturnExpired = options.supportsReturnExpired === true;
|
|
131
|
+
const createService = options.createService;
|
|
132
|
+
const scoped = (body) => withConformanceNamespace(createService, body, { prefix: "conf" });
|
|
133
|
+
describe(`cache provider conformance: ${options.name}`, () => {
|
|
134
|
+
it("reports healthy through the service healthcheck", () => scoped(async (ctx) => {
|
|
135
|
+
const service = await ctx.open();
|
|
136
|
+
assert.equal(typeof service.healthcheck, "function", "provider-backed services must expose healthcheck()");
|
|
137
|
+
await service.healthcheck();
|
|
138
|
+
}), timeout);
|
|
139
|
+
it("round-trips get/set/has/delete for JSON values", () => scoped(async (ctx) => {
|
|
140
|
+
const service = await ctx.open();
|
|
141
|
+
const tenant = ctx.tenant("crud");
|
|
142
|
+
await inCacheTenant(tenant, async () => {
|
|
143
|
+
const values = [
|
|
144
|
+
["object", { id: 1, name: "Za\u017C\xF3\u0142\u0107", nested: { list: [1, "two", true], empty: {} } }],
|
|
145
|
+
["array", [1, 2, { three: 3 }]],
|
|
146
|
+
["string", 'plain text with "quotes" and \n newline'],
|
|
147
|
+
["number", 42.5],
|
|
148
|
+
["zero", 0],
|
|
149
|
+
["boolean", false]
|
|
150
|
+
];
|
|
151
|
+
await assertCacheMiss(service, "object");
|
|
152
|
+
for (const [key, value] of values) await service.set(key, value);
|
|
153
|
+
for (const [key, value] of values) await assertCacheHit(service, key, value);
|
|
154
|
+
await service.set("object", { replaced: true });
|
|
155
|
+
await assertCacheHit(service, "object", { replaced: true });
|
|
156
|
+
assert.equal(await service.delete("object"), true);
|
|
157
|
+
await assertCacheMiss(service, "object");
|
|
158
|
+
assert.equal(await service.delete("object"), false, "second delete must report nothing removed");
|
|
159
|
+
assert.equal(await service.delete("never-set"), false);
|
|
160
|
+
await assertCacheHit(service, "array", [1, 2, { three: 3 }]);
|
|
161
|
+
});
|
|
162
|
+
}), timeout);
|
|
163
|
+
it("expires entries after a per-entry TTL", () => scoped(async (ctx) => {
|
|
164
|
+
const service = await ctx.open();
|
|
165
|
+
const tenant = ctx.tenant("ttl");
|
|
166
|
+
await inCacheTenant(tenant, async () => {
|
|
167
|
+
await service.set("short", "value", { ttl: ttlMs });
|
|
168
|
+
await service.set("forever", "value");
|
|
169
|
+
await assertCacheHit(service, "short", "value");
|
|
170
|
+
await sleep(ttlMs + ttlGraceMs);
|
|
171
|
+
await assertCacheMiss(service, "short");
|
|
172
|
+
await assertCacheHit(service, "forever", "value");
|
|
173
|
+
});
|
|
174
|
+
}), timeout);
|
|
175
|
+
it("applies the default TTL and lets a per-entry TTL override it", () => scoped(async (ctx) => {
|
|
176
|
+
const service = await ctx.open({ defaultTtl: ttlMs });
|
|
177
|
+
const tenant = ctx.tenant("default-ttl");
|
|
178
|
+
await inCacheTenant(tenant, async () => {
|
|
179
|
+
await service.set("defaulted", "a");
|
|
180
|
+
await service.set("overridden", "b", { ttl: 6e4 });
|
|
181
|
+
await assertCacheHit(service, "defaulted", "a");
|
|
182
|
+
await sleep(ttlMs + ttlGraceMs);
|
|
183
|
+
await assertCacheMiss(service, "defaulted");
|
|
184
|
+
await assertCacheHit(service, "overridden", "b");
|
|
185
|
+
});
|
|
186
|
+
}), timeout);
|
|
187
|
+
it("cleanup removes expired entries and keeps live ones", () => scoped(async (ctx) => {
|
|
188
|
+
const service = await ctx.open();
|
|
189
|
+
const tenant = ctx.tenant("cleanup");
|
|
190
|
+
await inCacheTenant(tenant, async () => {
|
|
191
|
+
await service.set("expiring-1", 1, { ttl: ttlMs });
|
|
192
|
+
await service.set("expiring-2", 2, { ttl: ttlMs });
|
|
193
|
+
await service.set("live", 3);
|
|
194
|
+
await sleep(ttlMs + ttlGraceMs);
|
|
195
|
+
if (supportsReturnExpired) {
|
|
196
|
+
assert.equal(await service.get("expiring-1", { returnExpired: true }), 1, "retained expired value must be readable with returnExpired");
|
|
197
|
+
const before = await service.stats();
|
|
198
|
+
assert.equal(before.size, 3);
|
|
199
|
+
assert.equal(before.expired, 2);
|
|
200
|
+
}
|
|
201
|
+
assert.equal(typeof service.cleanup, "function", "provider-backed services must expose cleanup()");
|
|
202
|
+
const removed = await service.cleanup();
|
|
203
|
+
assert.ok(Number.isInteger(removed) && removed >= 0, "cleanup must return a non-negative count");
|
|
204
|
+
if (supportsReturnExpired) assert.equal(removed, 2);
|
|
205
|
+
assert.equal(await service.get("expiring-1", { returnExpired: true }), null);
|
|
206
|
+
assert.deepEqual(sorted(await service.keys()), ["live"]);
|
|
207
|
+
const after = await service.stats();
|
|
208
|
+
assert.equal(after.size, 1);
|
|
209
|
+
assert.equal(after.expired, 0);
|
|
210
|
+
await assertCacheHit(service, "live", 3);
|
|
211
|
+
});
|
|
212
|
+
}), timeout);
|
|
213
|
+
it("deleteByTags removes each entry carrying any tag exactly once", () => scoped(async (ctx) => {
|
|
214
|
+
const service = await ctx.open();
|
|
215
|
+
const tenant = ctx.tenant("tags");
|
|
216
|
+
await inCacheTenant(tenant, async () => {
|
|
217
|
+
await service.set("a", "a", { tags: ["t1", "t2"] });
|
|
218
|
+
await service.set("b", "b", { tags: ["t2", "t3"] });
|
|
219
|
+
await service.set("c", "c", { tags: ["t3"] });
|
|
220
|
+
await service.set("d", "d");
|
|
221
|
+
assert.equal(await service.deleteByTags(["t1", "t2"]), 2, "overlapping tags must count each entry once");
|
|
222
|
+
await assertCacheMiss(service, "a");
|
|
223
|
+
await assertCacheMiss(service, "b");
|
|
224
|
+
await assertCacheHit(service, "c", "c");
|
|
225
|
+
await assertCacheHit(service, "d", "d");
|
|
226
|
+
assert.equal(await service.deleteByTags(["t1", "t2"]), 0, "repeated invalidation removes nothing");
|
|
227
|
+
assert.equal(await service.deleteByTags(["unknown-tag"]), 0);
|
|
228
|
+
assert.equal(await service.deleteByTags([]), 0);
|
|
229
|
+
});
|
|
230
|
+
}), timeout);
|
|
231
|
+
it("retagging an entry drops its old tag membership", () => scoped(async (ctx) => {
|
|
232
|
+
const service = await ctx.open();
|
|
233
|
+
const tenant = ctx.tenant("retag");
|
|
234
|
+
await inCacheTenant(tenant, async () => {
|
|
235
|
+
await service.set("record", "v1", { tags: ["old"] });
|
|
236
|
+
await service.set("record", "v2", { tags: ["new"] });
|
|
237
|
+
assert.equal(await service.deleteByTags(["old"]), 0, "old tag must no longer invalidate the entry");
|
|
238
|
+
await assertCacheHit(service, "record", "v2");
|
|
239
|
+
assert.equal(await service.deleteByTags(["new"]), 1);
|
|
240
|
+
await assertCacheMiss(service, "record");
|
|
241
|
+
await service.set("untagged", "v1", { tags: ["gone"] });
|
|
242
|
+
await service.set("untagged", "v2");
|
|
243
|
+
assert.equal(await service.deleteByTags(["gone"]), 0);
|
|
244
|
+
assert.equal(await service.clear(), 1, "an entry overwritten without tags must stay in its tenant scope");
|
|
245
|
+
await assertCacheMiss(service, "untagged");
|
|
246
|
+
});
|
|
247
|
+
}), timeout);
|
|
248
|
+
it("enumerates logical keys with glob patterns and reports scoped stats", () => scoped(async (ctx) => {
|
|
249
|
+
const service = await ctx.open();
|
|
250
|
+
const tenant = ctx.tenant("glob");
|
|
251
|
+
const other = ctx.tenant("glob-other");
|
|
252
|
+
await inCacheTenant(other, () => service.set("user:other", "x"));
|
|
253
|
+
await inCacheTenant(tenant, async () => {
|
|
254
|
+
for (const key of ["user:1", "user:2", "user:10", "order:1"]) await service.set(key, key);
|
|
255
|
+
assert.deepEqual(sorted(await service.keys()), ["order:1", "user:1", "user:10", "user:2"]);
|
|
256
|
+
assert.deepEqual(sorted(await service.keys("user:*")), ["user:1", "user:10", "user:2"]);
|
|
257
|
+
assert.deepEqual(sorted(await service.keys("user:?")), ["user:1", "user:2"]);
|
|
258
|
+
assert.deepEqual(await service.keys("missing:*"), []);
|
|
259
|
+
const stats = await service.stats();
|
|
260
|
+
assert.equal(stats.size, 4);
|
|
261
|
+
assert.equal(stats.expired, 0);
|
|
262
|
+
});
|
|
263
|
+
}), timeout);
|
|
264
|
+
it("scoped clear leaves other tenants and foreign namespaces intact", () => scoped(async (ctx) => {
|
|
265
|
+
const service = await ctx.open();
|
|
266
|
+
const foreign = await ctx.open({ namespace: ctx.foreignNamespace() });
|
|
267
|
+
const tenantA = ctx.tenant("clear-a");
|
|
268
|
+
const tenantB = ctx.tenant("clear-b");
|
|
269
|
+
await inCacheTenant(tenantA, async () => {
|
|
270
|
+
await service.set("one", 1, { tags: ["x"] });
|
|
271
|
+
await service.set("two", 2);
|
|
272
|
+
await service.set("three", 3, { ttl: 6e4 });
|
|
273
|
+
await foreign.set("one", "foreign");
|
|
274
|
+
});
|
|
275
|
+
await inCacheTenant(tenantB, () => service.set("one", "b"));
|
|
276
|
+
await inCacheTenant(null, () => service.set("one", "global"));
|
|
277
|
+
assert.equal(await inCacheTenant(tenantA, () => service.clear()), 3);
|
|
278
|
+
await inCacheTenant(tenantA, async () => {
|
|
279
|
+
await assertCacheMiss(service, "one");
|
|
280
|
+
await assertCacheMiss(service, "two");
|
|
281
|
+
assert.deepEqual(await service.keys(), []);
|
|
282
|
+
assert.equal((await service.stats()).size, 0);
|
|
283
|
+
await assertCacheHit(foreign, "one", "foreign");
|
|
284
|
+
});
|
|
285
|
+
await inCacheTenant(tenantB, () => assertCacheHit(service, "one", "b"));
|
|
286
|
+
await inCacheTenant(null, () => assertCacheHit(service, "one", "global"));
|
|
287
|
+
}), timeout);
|
|
288
|
+
it("isolates foreign namespaces on the same backing store", () => scoped(async (ctx) => {
|
|
289
|
+
const first = await ctx.open();
|
|
290
|
+
const second = await ctx.open({ namespace: ctx.foreignNamespace() });
|
|
291
|
+
const tenant = ctx.tenant("ns");
|
|
292
|
+
await inCacheTenant(tenant, async () => {
|
|
293
|
+
await first.set("shared-key", "first", { tags: ["shared-tag"] });
|
|
294
|
+
await second.set("shared-key", "second", { tags: ["shared-tag"] });
|
|
295
|
+
await second.set("second-only", true);
|
|
296
|
+
await assertCacheHit(first, "shared-key", "first");
|
|
297
|
+
await assertCacheHit(second, "shared-key", "second");
|
|
298
|
+
assert.deepEqual(sorted(await first.keys()), ["shared-key"]);
|
|
299
|
+
assert.equal((await first.stats()).size, 1);
|
|
300
|
+
assert.equal(await first.deleteByTags(["shared-tag"]), 1);
|
|
301
|
+
await assertCacheMiss(first, "shared-key");
|
|
302
|
+
await assertCacheHit(second, "shared-key", "second");
|
|
303
|
+
assert.equal(await first.clear(), 0);
|
|
304
|
+
await assertCacheHit(second, "second-only", true);
|
|
305
|
+
});
|
|
306
|
+
}), timeout);
|
|
307
|
+
it("keeps interleaved tenant contexts isolated", () => scoped(async (ctx) => {
|
|
308
|
+
const service = await ctx.open();
|
|
309
|
+
const tenants = [ctx.tenant("inter-a"), ctx.tenant("inter-b"), null];
|
|
310
|
+
await Promise.all(tenants.map((tenant, index) => inCacheTenant(tenant, async () => {
|
|
311
|
+
for (let round = 0; round < 5; round++) {
|
|
312
|
+
await service.set("same-key", { tenant, round }, { tags: ["round"] });
|
|
313
|
+
await new Promise((resolve) => setImmediate(resolve));
|
|
314
|
+
assert.deepEqual(await service.get("same-key"), { tenant, round });
|
|
315
|
+
}
|
|
316
|
+
await service.set(`only-${index}`, index);
|
|
317
|
+
})));
|
|
318
|
+
const [tenantA, tenantB] = tenants;
|
|
319
|
+
assert.equal(await inCacheTenant(tenantA, () => service.deleteByTags(["round"])), 1);
|
|
320
|
+
await inCacheTenant(tenantA, () => assertCacheMiss(service, "same-key"));
|
|
321
|
+
await inCacheTenant(tenantB, () => assertCacheHit(service, "same-key", { tenant: tenantB, round: 4 }));
|
|
322
|
+
await inCacheTenant(null, () => assertCacheHit(service, "same-key", { tenant: null, round: 4 }));
|
|
323
|
+
await inCacheTenant(tenantB, async () => {
|
|
324
|
+
assert.deepEqual(sorted(await service.keys()), ["only-1", "same-key"]);
|
|
325
|
+
});
|
|
326
|
+
}), timeout);
|
|
327
|
+
it("propagates writes and invalidations across separate service instances", () => scoped(async (ctx) => {
|
|
328
|
+
const writer = await ctx.open();
|
|
329
|
+
const reader = await ctx.open();
|
|
330
|
+
const tenant = ctx.tenant("cross");
|
|
331
|
+
await inCacheTenant(tenant, async () => {
|
|
332
|
+
await writer.set("record", "v1", { tags: ["records"] });
|
|
333
|
+
await assertCacheHit(reader, "record", "v1");
|
|
334
|
+
assert.equal(await reader.deleteByTags(["records"]), 1);
|
|
335
|
+
await assertCacheMiss(writer, "record");
|
|
336
|
+
await writer.set("retagged", "v1", { tags: ["old"] });
|
|
337
|
+
await reader.set("retagged", "v2", { tags: ["new"] });
|
|
338
|
+
assert.equal(await writer.deleteByTags(["old"]), 0);
|
|
339
|
+
await assertCacheHit(writer, "retagged", "v2");
|
|
340
|
+
assert.equal(await writer.deleteByTags(["old", "new", "other"]), 1);
|
|
341
|
+
await assertCacheMiss(reader, "retagged");
|
|
342
|
+
await reader.set("deleted", 1);
|
|
343
|
+
assert.equal(await writer.delete("deleted"), true);
|
|
344
|
+
await assertCacheMiss(reader, "deleted");
|
|
345
|
+
});
|
|
346
|
+
}), timeout);
|
|
347
|
+
if (options.createIndependentProcess) {
|
|
348
|
+
const createIndependentProcess = options.createIndependentProcess;
|
|
349
|
+
it("propagates writes and invalidations to and from an independent process", () => scoped(async (ctx) => {
|
|
350
|
+
const local = await ctx.open();
|
|
351
|
+
const remote = ctx.track(await createIndependentProcess(ctx.namespace));
|
|
352
|
+
const tenant = ctx.tenant("remote");
|
|
353
|
+
const other = ctx.tenant("remote-other");
|
|
354
|
+
await inCacheTenant(tenant, () => local.set("from-parent", { by: "parent" }, { tags: ["parent-tag"] }));
|
|
355
|
+
assert.deepEqual(await runRemote(remote, { op: "get", tenant, key: "from-parent" }), { by: "parent" });
|
|
356
|
+
assert.equal(await runRemote(remote, { op: "deleteByTags", tenant, tags: ["parent-tag"] }), 1);
|
|
357
|
+
await inCacheTenant(tenant, () => assertCacheMiss(local, "from-parent"));
|
|
358
|
+
await runRemote(remote, { op: "set", tenant, key: "from-child", value: { by: "child" }, tags: ["child-tag"] });
|
|
359
|
+
await runRemote(remote, { op: "set", tenant: other, key: "from-child", value: "other-tenant", tags: ["child-tag"] });
|
|
360
|
+
await inCacheTenant(tenant, async () => {
|
|
361
|
+
await assertCacheHit(local, "from-child", { by: "child" });
|
|
362
|
+
assert.deepEqual(await local.keys("from-*"), ["from-child"]);
|
|
363
|
+
assert.equal(await local.deleteByTags(["child-tag"]), 1);
|
|
364
|
+
});
|
|
365
|
+
assert.equal(await runRemote(remote, { op: "has", tenant, key: "from-child" }), false);
|
|
366
|
+
assert.equal(await runRemote(remote, { op: "get", tenant: other, key: "from-child" }), "other-tenant");
|
|
367
|
+
await inCacheTenant(tenant, async () => {
|
|
368
|
+
await local.set("record", "v1", { tags: ["old"] });
|
|
369
|
+
await local.set("unrelated", "keep", { tags: ["unrelated"] });
|
|
370
|
+
});
|
|
371
|
+
await runRemote(remote, { op: "set", tenant, key: "record", value: "v2", tags: ["new-1"] });
|
|
372
|
+
await inCacheTenant(tenant, async () => {
|
|
373
|
+
assert.equal(await local.deleteByTags(["old", "new-1", "new-2"]), 1, "remote retag must be honoured exactly once");
|
|
374
|
+
await assertCacheMiss(local, "record");
|
|
375
|
+
await assertCacheHit(local, "unrelated", "keep");
|
|
376
|
+
});
|
|
377
|
+
assert.equal(await runRemote(remote, { op: "clear", tenant: other }), 1);
|
|
378
|
+
await inCacheTenant(tenant, () => assertCacheHit(local, "unrelated", "keep"));
|
|
379
|
+
await inCacheTenant(other, () => assertCacheMiss(local, "from-child"));
|
|
380
|
+
}), timeout);
|
|
381
|
+
}
|
|
382
|
+
if (options.corrupt) {
|
|
383
|
+
const corrupt = options.corrupt;
|
|
384
|
+
it("treats a corrupt stored value as a miss and recovers on rewrite", () => scoped(async (ctx) => {
|
|
385
|
+
const service = await ctx.open();
|
|
386
|
+
const tenant = ctx.tenant("corrupt");
|
|
387
|
+
await inCacheTenant(tenant, async () => {
|
|
388
|
+
await service.set("broken", { ok: true }, { tags: ["corrupt-tag"] });
|
|
389
|
+
await service.set("healthy", { ok: true });
|
|
390
|
+
await corrupt({ namespace: ctx.namespace, tenant, key: "broken", physicalKey: conformancePhysicalValueKey("broken", tenant) });
|
|
391
|
+
await assertCacheMiss(service, "broken");
|
|
392
|
+
await assertCacheHit(service, "healthy", { ok: true });
|
|
393
|
+
await service.set("broken", { ok: "again" });
|
|
394
|
+
await assertCacheHit(service, "broken", { ok: "again" });
|
|
395
|
+
});
|
|
396
|
+
}), timeout);
|
|
397
|
+
}
|
|
398
|
+
it(`crosses the batch boundary with ${batchSize + 1} entries`, () => scoped(async (ctx) => {
|
|
399
|
+
const service = await ctx.open();
|
|
400
|
+
const tenant = ctx.tenant("batch");
|
|
401
|
+
const other = ctx.tenant("batch-other");
|
|
402
|
+
const count = batchSize + 1;
|
|
403
|
+
await inCacheTenant(other, () => service.set("bulk:0", "other", { tags: ["bulk", "even"] }));
|
|
404
|
+
await inCacheTenant(tenant, async () => {
|
|
405
|
+
await writeInChunks(count, (index) => service.set(`bulk:${index}`, index, { tags: index % 2 === 0 ? ["bulk", "even"] : ["bulk"] }));
|
|
406
|
+
assert.equal((await service.keys("bulk:*")).length, count);
|
|
407
|
+
assert.equal((await service.stats()).size, count);
|
|
408
|
+
const evens = Math.ceil(count / 2);
|
|
409
|
+
assert.equal(await service.deleteByTags(["even"]), evens);
|
|
410
|
+
assert.equal((await service.keys("bulk:*")).length, count - evens);
|
|
411
|
+
await assertCacheMiss(service, "bulk:0");
|
|
412
|
+
await assertCacheHit(service, "bulk:1", 1);
|
|
413
|
+
assert.equal(await service.deleteByTags(["bulk", "even"]), count - evens);
|
|
414
|
+
assert.equal((await service.stats()).size, 0);
|
|
415
|
+
});
|
|
416
|
+
await inCacheTenant(other, () => assertCacheHit(service, "bulk:0", "other"));
|
|
417
|
+
}), timeout);
|
|
418
|
+
it("closes idempotently and a closed service reconnects or fails cleanly", () => scoped(async (ctx) => {
|
|
419
|
+
const service = await ctx.open();
|
|
420
|
+
const tenant = ctx.tenant("close");
|
|
421
|
+
await inCacheTenant(tenant, () => service.set("persisted", "value"));
|
|
422
|
+
assert.equal(typeof service.close, "function", "provider-backed services must expose close()");
|
|
423
|
+
await service.close();
|
|
424
|
+
await service.close();
|
|
425
|
+
await Promise.all([service.close(), service.close()]);
|
|
426
|
+
const outcome = await settleWithin(inCacheTenant(tenant, () => service.get("persisted")), 15e3);
|
|
427
|
+
if (outcome.status === "rejected") {
|
|
428
|
+
assert.ok(outcome.reason instanceof Error, "a closed service must fail with an Error");
|
|
429
|
+
} else {
|
|
430
|
+
assert.ok(outcome.value === "value" || outcome.value === null, "a reconnected service returns the stored value or a miss");
|
|
431
|
+
}
|
|
432
|
+
await service.close();
|
|
433
|
+
const reopened = await ctx.open();
|
|
434
|
+
await inCacheTenant(tenant, () => assertCacheHit(reopened, "persisted", "value"));
|
|
435
|
+
}), timeout);
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
export {
|
|
439
|
+
assertCacheHit,
|
|
440
|
+
assertCacheMiss,
|
|
441
|
+
conformancePhysicalValueKey,
|
|
442
|
+
defineCacheProviderConformance,
|
|
443
|
+
inCacheTenant,
|
|
444
|
+
randomNamespace,
|
|
445
|
+
sleep,
|
|
446
|
+
withConformanceNamespace
|
|
447
|
+
};
|
|
448
|
+
//# sourceMappingURL=conformance.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/testing/conformance.ts"],
|
|
4
|
+
"sourcesContent": ["import assert from 'node:assert/strict'\nimport { randomBytes } from 'node:crypto'\nimport type { CacheStrategy, CacheValue } from '../types'\nimport { runWithCacheTenant } from '../tenantContext'\nimport { validateCacheProviderNamespace } from '../provider'\nimport { resolvePhysicalCacheValueKey } from '../service'\nimport type { ConformanceRemoteOp, ConformanceRemoteProcess } from './remote'\n\nexport type { ConformanceRemoteOp, ConformanceRemoteProcess } from './remote'\n\nexport type ConformanceServiceOptions = {\n /** Forward to `createCacheService({ provider, defaultTtl })`. */\n defaultTtl?: number\n}\n\nexport type ConformanceCorruptTarget = {\n namespace: string\n tenant: string | null\n /** Logical key passed to the tenant-aware service. */\n key: string\n /** Physical key the tenant-aware wrapper hands to the provider strategy for the value record. */\n physicalKey: string\n}\n\nexport type CreateConformanceService = (\n namespace: string,\n options?: ConformanceServiceOptions,\n) => CacheStrategy | Promise<CacheStrategy>\n\nexport type CacheProviderConformanceOptions = {\n name: string\n /**\n * Build a full tenant-aware service (`createCacheService({ provider })`) for\n * the given deployment namespace. Called several times per test: separate\n * calls with the same namespace MUST share the backing store.\n */\n createService: CreateConformanceService\n /** Spawn an independent process serving operations for the same backing store and namespace. */\n createIndependentProcess?: (namespace: string) => Promise<ConformanceRemoteProcess>\n /** Make the provider's stored value for `physicalKey` undecodable. Enables the corrupt-value test. */\n corrupt?: (target: ConformanceCorruptTarget) => Promise<void>\n /** Number of logical entries written by the batch-boundary test (one more is added to cross it). Default 600. */\n batchSize?: number\n /** Short TTL used by expiry tests, in milliseconds. Default 150. */\n ttlMs?: number\n /** Extra wait after a TTL elapses before asserting expiry. Default 100. */\n ttlGraceMs?: number\n /** Provider retains logically expired records until cleanup (enables `returnExpired` and exact cleanup counts). */\n supportsReturnExpired?: boolean\n /** Per-test timeout in milliseconds. Default 120000. */\n testTimeoutMs?: number\n}\n\ntype TestBody = () => Promise<void>\n\ntype TestRunnerGlobals = {\n describe(name: string, body: () => void): void\n it(name: string, body: TestBody, timeout?: number): void\n}\n\nfunction resolveTestRunner(): TestRunnerGlobals {\n const scope = globalThis as unknown as Partial<TestRunnerGlobals>\n if (typeof scope.describe !== 'function' || typeof scope.it !== 'function') {\n throw new Error('[internal] defineCacheProviderConformance requires jest-compatible describe/it globals')\n }\n return { describe: scope.describe, it: scope.it }\n}\n\nconst DEFAULT_BATCH_SIZE = 600\nconst DEFAULT_TTL_MS = 150\nconst DEFAULT_TTL_GRACE_MS = 100\nconst DEFAULT_TEST_TIMEOUT_MS = 120_000\nconst WRITE_CONCURRENCY = 25\n\nexport function sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms))\n}\n\nexport function randomNamespace(prefix = 'conf'): string {\n const safePrefix = prefix.replace(/[^a-zA-Z0-9._-]/g, '_').slice(0, 40) || 'conf'\n return validateCacheProviderNamespace(`${safePrefix}-${randomBytes(6).toString('hex')}`)\n}\n\nfunction randomTenant(label: string): string {\n return `${label}-${randomBytes(4).toString('hex')}`\n}\n\n/**\n * Physical value-record key the tenant-aware wrapper writes for a logical key.\n * Mirrors the wrapper layout in `service.ts`; used only to target corruption.\n */\nexport function conformancePhysicalValueKey(key: string, tenant: string | null): string {\n return resolvePhysicalCacheValueKey(key, tenant)\n}\n\nexport function inCacheTenant<T>(tenant: string | null, fn: () => Promise<T>): Promise<T> {\n return runWithCacheTenant(tenant, fn)\n}\n\nexport type ConformanceNamespaceContext = {\n namespace: string\n /** Open a tracked service on this namespace (or another tracked namespace). */\n open(options?: ConformanceServiceOptions & { namespace?: string }): Promise<CacheStrategy>\n /** Allocate and track a fresh namespace (closed and cleared on teardown). */\n foreignNamespace(): string\n /** Allocate and track a unique tenant id (cleared on teardown). */\n tenant(label: string): string\n /** Track an independent process; closed on teardown. */\n track(remote: ConformanceRemoteProcess): ConformanceRemoteProcess\n}\n\n/**\n * Run `body` with a fresh random namespace. On exit (success or failure) every\n * tracked tenant (plus the global scope) is cleared on every tracked namespace,\n * then all opened services and remotes are closed. Teardown errors are swallowed\n * so they never mask the test failure.\n */\nexport async function withConformanceNamespace<T>(\n createService: CreateConformanceService,\n body: (context: ConformanceNamespaceContext) => Promise<T>,\n options: { prefix?: string } = {},\n): Promise<T> {\n const namespace = randomNamespace(options.prefix)\n const namespaces = new Set<string>([namespace])\n const tenants = new Set<string | null>([null])\n const services: CacheStrategy[] = []\n const remotes: ConformanceRemoteProcess[] = []\n\n const context: ConformanceNamespaceContext = {\n namespace,\n async open(openOptions = {}) {\n const target = openOptions.namespace ?? namespace\n namespaces.add(target)\n const service = await createService(target, openOptions.defaultTtl !== undefined ? { defaultTtl: openOptions.defaultTtl } : undefined)\n services.push(service)\n return service\n },\n foreignNamespace() {\n const foreign = randomNamespace(options.prefix)\n namespaces.add(foreign)\n return foreign\n },\n tenant(label) {\n const tenant = randomTenant(label)\n tenants.add(tenant)\n return tenant\n },\n track(remote) {\n remotes.push(remote)\n return remote\n },\n }\n\n try {\n return await body(context)\n } finally {\n for (const remote of remotes) {\n await remote.close().catch(() => undefined)\n }\n for (const target of namespaces) {\n let cleaner: CacheStrategy | null = null\n try {\n cleaner = await createService(target)\n for (const tenant of tenants) {\n await runWithCacheTenant(tenant, () => cleaner!.clear()).catch(() => undefined)\n }\n } catch {\n // teardown must not mask the test outcome\n } finally {\n await cleaner?.close?.().catch(() => undefined)\n }\n }\n for (const service of services) {\n await service.close?.().catch(() => undefined)\n }\n }\n}\n\nexport async function assertCacheHit(service: CacheStrategy, key: string, expected: CacheValue, message?: string): Promise<void> {\n assert.deepEqual(await service.get(key), expected, message ?? `expected cache hit for \"${key}\"`)\n assert.equal(await service.has(key), true, message ?? `expected has(\"${key}\") to be true`)\n}\n\nexport async function assertCacheMiss(service: CacheStrategy, key: string, message?: string): Promise<void> {\n assert.equal(await service.get(key), null, message ?? `expected cache miss for \"${key}\"`)\n assert.equal(await service.has(key), false, message ?? `expected has(\"${key}\") to be false`)\n}\n\nfunction sorted(values: string[]): string[] {\n return [...values].sort((left, right) => (left < right ? -1 : left > right ? 1 : 0))\n}\n\nasync function writeInChunks(count: number, write: (index: number) => Promise<void>): Promise<void> {\n for (let start = 0; start < count; start += WRITE_CONCURRENCY) {\n const end = Math.min(count, start + WRITE_CONCURRENCY)\n const batch: Promise<void>[] = []\n for (let index = start; index < end; index++) batch.push(write(index))\n await Promise.all(batch)\n }\n}\n\nfunction runRemote(remote: ConformanceRemoteProcess, operation: ConformanceRemoteOp): Promise<unknown> {\n return remote.run(operation)\n}\n\nasync function settleWithin<T>(promise: Promise<T>, ms: number): Promise<{ status: 'fulfilled'; value: T } | { status: 'rejected'; reason: unknown }> {\n let timer: ReturnType<typeof setTimeout> | null = null\n const timeout = new Promise<never>((_, reject) => {\n timer = setTimeout(() => reject(new Error(`[internal] operation did not settle within ${ms}ms`)), ms)\n })\n try {\n const value = await Promise.race([promise, timeout])\n return { status: 'fulfilled', value }\n } catch (reason) {\n if (reason instanceof Error && reason.message.startsWith('[internal] operation did not settle')) throw reason\n return { status: 'rejected', reason }\n } finally {\n if (timer) clearTimeout(timer)\n }\n}\n\n/**\n * Register the provider conformance suite with the ambient jest-compatible\n * `describe`/`it` globals. Every test uses a fresh random namespace and clears\n * the tenants it touched on teardown.\n */\nexport function defineCacheProviderConformance(options: CacheProviderConformanceOptions): void {\n const { describe, it } = resolveTestRunner()\n const batchSize = options.batchSize ?? DEFAULT_BATCH_SIZE\n const ttlMs = options.ttlMs ?? DEFAULT_TTL_MS\n const ttlGraceMs = options.ttlGraceMs ?? DEFAULT_TTL_GRACE_MS\n const timeout = options.testTimeoutMs ?? DEFAULT_TEST_TIMEOUT_MS\n const supportsReturnExpired = options.supportsReturnExpired === true\n const createService = options.createService\n const scoped = <T>(body: (context: ConformanceNamespaceContext) => Promise<T>) =>\n withConformanceNamespace(createService, body, { prefix: 'conf' })\n\n describe(`cache provider conformance: ${options.name}`, () => {\n it('reports healthy through the service healthcheck', () => scoped(async (ctx) => {\n const service = await ctx.open()\n assert.equal(typeof service.healthcheck, 'function', 'provider-backed services must expose healthcheck()')\n await service.healthcheck!()\n }), timeout)\n\n it('round-trips get/set/has/delete for JSON values', () => scoped(async (ctx) => {\n const service = await ctx.open()\n const tenant = ctx.tenant('crud')\n await inCacheTenant(tenant, async () => {\n const values: Array<[string, CacheValue]> = [\n ['object', { id: 1, name: 'Za\u017C\u00F3\u0142\u0107', nested: { list: [1, 'two', true], empty: {} } }],\n ['array', [1, 2, { three: 3 }]],\n ['string', 'plain text with \"quotes\" and \\n newline'],\n ['number', 42.5],\n ['zero', 0],\n ['boolean', false],\n ]\n await assertCacheMiss(service, 'object')\n for (const [key, value] of values) await service.set(key, value)\n for (const [key, value] of values) await assertCacheHit(service, key, value)\n\n await service.set('object', { replaced: true })\n await assertCacheHit(service, 'object', { replaced: true })\n\n assert.equal(await service.delete('object'), true)\n await assertCacheMiss(service, 'object')\n assert.equal(await service.delete('object'), false, 'second delete must report nothing removed')\n assert.equal(await service.delete('never-set'), false)\n await assertCacheHit(service, 'array', [1, 2, { three: 3 }])\n })\n }), timeout)\n\n it('expires entries after a per-entry TTL', () => scoped(async (ctx) => {\n const service = await ctx.open()\n const tenant = ctx.tenant('ttl')\n await inCacheTenant(tenant, async () => {\n await service.set('short', 'value', { ttl: ttlMs })\n await service.set('forever', 'value')\n await assertCacheHit(service, 'short', 'value')\n await sleep(ttlMs + ttlGraceMs)\n await assertCacheMiss(service, 'short')\n await assertCacheHit(service, 'forever', 'value')\n })\n }), timeout)\n\n it('applies the default TTL and lets a per-entry TTL override it', () => scoped(async (ctx) => {\n const service = await ctx.open({ defaultTtl: ttlMs })\n const tenant = ctx.tenant('default-ttl')\n await inCacheTenant(tenant, async () => {\n await service.set('defaulted', 'a')\n await service.set('overridden', 'b', { ttl: 60_000 })\n await assertCacheHit(service, 'defaulted', 'a')\n await sleep(ttlMs + ttlGraceMs)\n await assertCacheMiss(service, 'defaulted')\n await assertCacheHit(service, 'overridden', 'b')\n })\n }), timeout)\n\n it('cleanup removes expired entries and keeps live ones', () => scoped(async (ctx) => {\n const service = await ctx.open()\n const tenant = ctx.tenant('cleanup')\n await inCacheTenant(tenant, async () => {\n await service.set('expiring-1', 1, { ttl: ttlMs })\n await service.set('expiring-2', 2, { ttl: ttlMs })\n await service.set('live', 3)\n await sleep(ttlMs + ttlGraceMs)\n if (supportsReturnExpired) {\n assert.equal(await service.get('expiring-1', { returnExpired: true }), 1, 'retained expired value must be readable with returnExpired')\n const before = await service.stats()\n assert.equal(before.size, 3)\n assert.equal(before.expired, 2)\n }\n assert.equal(typeof service.cleanup, 'function', 'provider-backed services must expose cleanup()')\n const removed = await service.cleanup!()\n assert.ok(Number.isInteger(removed) && removed >= 0, 'cleanup must return a non-negative count')\n if (supportsReturnExpired) assert.equal(removed, 2)\n assert.equal(await service.get('expiring-1', { returnExpired: true }), null)\n assert.deepEqual(sorted(await service.keys()), ['live'])\n const after = await service.stats()\n assert.equal(after.size, 1)\n assert.equal(after.expired, 0)\n await assertCacheHit(service, 'live', 3)\n })\n }), timeout)\n\n it('deleteByTags removes each entry carrying any tag exactly once', () => scoped(async (ctx) => {\n const service = await ctx.open()\n const tenant = ctx.tenant('tags')\n await inCacheTenant(tenant, async () => {\n await service.set('a', 'a', { tags: ['t1', 't2'] })\n await service.set('b', 'b', { tags: ['t2', 't3'] })\n await service.set('c', 'c', { tags: ['t3'] })\n await service.set('d', 'd')\n assert.equal(await service.deleteByTags(['t1', 't2']), 2, 'overlapping tags must count each entry once')\n await assertCacheMiss(service, 'a')\n await assertCacheMiss(service, 'b')\n await assertCacheHit(service, 'c', 'c')\n await assertCacheHit(service, 'd', 'd')\n assert.equal(await service.deleteByTags(['t1', 't2']), 0, 'repeated invalidation removes nothing')\n assert.equal(await service.deleteByTags(['unknown-tag']), 0)\n assert.equal(await service.deleteByTags([]), 0)\n })\n }), timeout)\n\n it('retagging an entry drops its old tag membership', () => scoped(async (ctx) => {\n const service = await ctx.open()\n const tenant = ctx.tenant('retag')\n await inCacheTenant(tenant, async () => {\n await service.set('record', 'v1', { tags: ['old'] })\n await service.set('record', 'v2', { tags: ['new'] })\n assert.equal(await service.deleteByTags(['old']), 0, 'old tag must no longer invalidate the entry')\n await assertCacheHit(service, 'record', 'v2')\n assert.equal(await service.deleteByTags(['new']), 1)\n await assertCacheMiss(service, 'record')\n\n await service.set('untagged', 'v1', { tags: ['gone'] })\n await service.set('untagged', 'v2')\n assert.equal(await service.deleteByTags(['gone']), 0)\n assert.equal(await service.clear(), 1, 'an entry overwritten without tags must stay in its tenant scope')\n await assertCacheMiss(service, 'untagged')\n })\n }), timeout)\n\n it('enumerates logical keys with glob patterns and reports scoped stats', () => scoped(async (ctx) => {\n const service = await ctx.open()\n const tenant = ctx.tenant('glob')\n const other = ctx.tenant('glob-other')\n await inCacheTenant(other, () => service.set('user:other', 'x'))\n await inCacheTenant(tenant, async () => {\n for (const key of ['user:1', 'user:2', 'user:10', 'order:1']) await service.set(key, key)\n assert.deepEqual(sorted(await service.keys()), ['order:1', 'user:1', 'user:10', 'user:2'])\n assert.deepEqual(sorted(await service.keys('user:*')), ['user:1', 'user:10', 'user:2'])\n assert.deepEqual(sorted(await service.keys('user:?')), ['user:1', 'user:2'])\n assert.deepEqual(await service.keys('missing:*'), [])\n const stats = await service.stats()\n assert.equal(stats.size, 4)\n assert.equal(stats.expired, 0)\n })\n }), timeout)\n\n it('scoped clear leaves other tenants and foreign namespaces intact', () => scoped(async (ctx) => {\n const service = await ctx.open()\n const foreign = await ctx.open({ namespace: ctx.foreignNamespace() })\n const tenantA = ctx.tenant('clear-a')\n const tenantB = ctx.tenant('clear-b')\n await inCacheTenant(tenantA, async () => {\n await service.set('one', 1, { tags: ['x'] })\n await service.set('two', 2)\n await service.set('three', 3, { ttl: 60_000 })\n await foreign.set('one', 'foreign')\n })\n await inCacheTenant(tenantB, () => service.set('one', 'b'))\n await inCacheTenant(null, () => service.set('one', 'global'))\n\n assert.equal(await inCacheTenant(tenantA, () => service.clear()), 3)\n await inCacheTenant(tenantA, async () => {\n await assertCacheMiss(service, 'one')\n await assertCacheMiss(service, 'two')\n assert.deepEqual(await service.keys(), [])\n assert.equal((await service.stats()).size, 0)\n await assertCacheHit(foreign, 'one', 'foreign')\n })\n await inCacheTenant(tenantB, () => assertCacheHit(service, 'one', 'b'))\n await inCacheTenant(null, () => assertCacheHit(service, 'one', 'global'))\n }), timeout)\n\n it('isolates foreign namespaces on the same backing store', () => scoped(async (ctx) => {\n const first = await ctx.open()\n const second = await ctx.open({ namespace: ctx.foreignNamespace() })\n const tenant = ctx.tenant('ns')\n await inCacheTenant(tenant, async () => {\n await first.set('shared-key', 'first', { tags: ['shared-tag'] })\n await second.set('shared-key', 'second', { tags: ['shared-tag'] })\n await second.set('second-only', true)\n await assertCacheHit(first, 'shared-key', 'first')\n await assertCacheHit(second, 'shared-key', 'second')\n assert.deepEqual(sorted(await first.keys()), ['shared-key'])\n assert.equal((await first.stats()).size, 1)\n assert.equal(await first.deleteByTags(['shared-tag']), 1)\n await assertCacheMiss(first, 'shared-key')\n await assertCacheHit(second, 'shared-key', 'second')\n assert.equal(await first.clear(), 0)\n await assertCacheHit(second, 'second-only', true)\n })\n }), timeout)\n\n it('keeps interleaved tenant contexts isolated', () => scoped(async (ctx) => {\n const service = await ctx.open()\n const tenants: Array<string | null> = [ctx.tenant('inter-a'), ctx.tenant('inter-b'), null]\n await Promise.all(tenants.map((tenant, index) => inCacheTenant(tenant, async () => {\n for (let round = 0; round < 5; round++) {\n await service.set('same-key', { tenant, round }, { tags: ['round'] })\n await new Promise((resolve) => setImmediate(resolve))\n assert.deepEqual(await service.get('same-key'), { tenant, round })\n }\n await service.set(`only-${index}`, index)\n })))\n const [tenantA, tenantB] = tenants\n assert.equal(await inCacheTenant(tenantA, () => service.deleteByTags(['round'])), 1)\n await inCacheTenant(tenantA, () => assertCacheMiss(service, 'same-key'))\n await inCacheTenant(tenantB, () => assertCacheHit(service, 'same-key', { tenant: tenantB, round: 4 }))\n await inCacheTenant(null, () => assertCacheHit(service, 'same-key', { tenant: null, round: 4 }))\n await inCacheTenant(tenantB, async () => {\n assert.deepEqual(sorted(await service.keys()), ['only-1', 'same-key'])\n })\n }), timeout)\n\n it('propagates writes and invalidations across separate service instances', () => scoped(async (ctx) => {\n const writer = await ctx.open()\n const reader = await ctx.open()\n const tenant = ctx.tenant('cross')\n await inCacheTenant(tenant, async () => {\n await writer.set('record', 'v1', { tags: ['records'] })\n await assertCacheHit(reader, 'record', 'v1')\n assert.equal(await reader.deleteByTags(['records']), 1)\n await assertCacheMiss(writer, 'record')\n\n await writer.set('retagged', 'v1', { tags: ['old'] })\n await reader.set('retagged', 'v2', { tags: ['new'] })\n assert.equal(await writer.deleteByTags(['old']), 0)\n await assertCacheHit(writer, 'retagged', 'v2')\n assert.equal(await writer.deleteByTags(['old', 'new', 'other']), 1)\n await assertCacheMiss(reader, 'retagged')\n\n await reader.set('deleted', 1)\n assert.equal(await writer.delete('deleted'), true)\n await assertCacheMiss(reader, 'deleted')\n })\n }), timeout)\n\n if (options.createIndependentProcess) {\n const createIndependentProcess = options.createIndependentProcess\n it('propagates writes and invalidations to and from an independent process', () => scoped(async (ctx) => {\n const local = await ctx.open()\n const remote = ctx.track(await createIndependentProcess(ctx.namespace))\n const tenant = ctx.tenant('remote')\n const other = ctx.tenant('remote-other')\n\n await inCacheTenant(tenant, () => local.set('from-parent', { by: 'parent' }, { tags: ['parent-tag'] }))\n assert.deepEqual(await runRemote(remote, { op: 'get', tenant, key: 'from-parent' }), { by: 'parent' })\n assert.equal(await runRemote(remote, { op: 'deleteByTags', tenant, tags: ['parent-tag'] }), 1)\n await inCacheTenant(tenant, () => assertCacheMiss(local, 'from-parent'))\n\n await runRemote(remote, { op: 'set', tenant, key: 'from-child', value: { by: 'child' }, tags: ['child-tag'] })\n await runRemote(remote, { op: 'set', tenant: other, key: 'from-child', value: 'other-tenant', tags: ['child-tag'] })\n await inCacheTenant(tenant, async () => {\n await assertCacheHit(local, 'from-child', { by: 'child' })\n assert.deepEqual(await local.keys('from-*'), ['from-child'])\n assert.equal(await local.deleteByTags(['child-tag']), 1)\n })\n assert.equal(await runRemote(remote, { op: 'has', tenant, key: 'from-child' }), false)\n assert.equal(await runRemote(remote, { op: 'get', tenant: other, key: 'from-child' }), 'other-tenant')\n\n await inCacheTenant(tenant, async () => {\n await local.set('record', 'v1', { tags: ['old'] })\n await local.set('unrelated', 'keep', { tags: ['unrelated'] })\n })\n await runRemote(remote, { op: 'set', tenant, key: 'record', value: 'v2', tags: ['new-1'] })\n await inCacheTenant(tenant, async () => {\n assert.equal(await local.deleteByTags(['old', 'new-1', 'new-2']), 1, 'remote retag must be honoured exactly once')\n await assertCacheMiss(local, 'record')\n await assertCacheHit(local, 'unrelated', 'keep')\n })\n\n assert.equal(await runRemote(remote, { op: 'clear', tenant: other }), 1)\n await inCacheTenant(tenant, () => assertCacheHit(local, 'unrelated', 'keep'))\n await inCacheTenant(other, () => assertCacheMiss(local, 'from-child'))\n }), timeout)\n }\n\n if (options.corrupt) {\n const corrupt = options.corrupt\n it('treats a corrupt stored value as a miss and recovers on rewrite', () => scoped(async (ctx) => {\n const service = await ctx.open()\n const tenant = ctx.tenant('corrupt')\n await inCacheTenant(tenant, async () => {\n await service.set('broken', { ok: true }, { tags: ['corrupt-tag'] })\n await service.set('healthy', { ok: true })\n await corrupt({ namespace: ctx.namespace, tenant, key: 'broken', physicalKey: conformancePhysicalValueKey('broken', tenant) })\n await assertCacheMiss(service, 'broken')\n await assertCacheHit(service, 'healthy', { ok: true })\n await service.set('broken', { ok: 'again' })\n await assertCacheHit(service, 'broken', { ok: 'again' })\n })\n }), timeout)\n }\n\n it(`crosses the batch boundary with ${batchSize + 1} entries`, () => scoped(async (ctx) => {\n const service = await ctx.open()\n const tenant = ctx.tenant('batch')\n const other = ctx.tenant('batch-other')\n const count = batchSize + 1\n await inCacheTenant(other, () => service.set('bulk:0', 'other', { tags: ['bulk', 'even'] }))\n await inCacheTenant(tenant, async () => {\n await writeInChunks(count, (index) => service.set(`bulk:${index}`, index, { tags: index % 2 === 0 ? ['bulk', 'even'] : ['bulk'] }))\n assert.equal((await service.keys('bulk:*')).length, count)\n assert.equal((await service.stats()).size, count)\n const evens = Math.ceil(count / 2)\n assert.equal(await service.deleteByTags(['even']), evens)\n assert.equal((await service.keys('bulk:*')).length, count - evens)\n await assertCacheMiss(service, 'bulk:0')\n await assertCacheHit(service, 'bulk:1', 1)\n assert.equal(await service.deleteByTags(['bulk', 'even']), count - evens)\n assert.equal((await service.stats()).size, 0)\n })\n await inCacheTenant(other, () => assertCacheHit(service, 'bulk:0', 'other'))\n }), timeout)\n\n it('closes idempotently and a closed service reconnects or fails cleanly', () => scoped(async (ctx) => {\n const service = await ctx.open()\n const tenant = ctx.tenant('close')\n await inCacheTenant(tenant, () => service.set('persisted', 'value'))\n assert.equal(typeof service.close, 'function', 'provider-backed services must expose close()')\n await service.close!()\n await service.close!()\n await Promise.all([service.close!(), service.close!()])\n\n const outcome = await settleWithin(inCacheTenant(tenant, () => service.get('persisted')), 15_000)\n if (outcome.status === 'rejected') {\n assert.ok(outcome.reason instanceof Error, 'a closed service must fail with an Error')\n } else {\n assert.ok(outcome.value === 'value' || outcome.value === null, 'a reconnected service returns the stored value or a miss')\n }\n await service.close!()\n\n const reopened = await ctx.open()\n await inCacheTenant(tenant, () => assertCacheHit(reopened, 'persisted', 'value'))\n }), timeout)\n })\n}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,mBAAmB;AAE5B,SAAS,0BAA0B;AACnC,SAAS,sCAAsC;AAC/C,SAAS,oCAAoC;AAuD7C,SAAS,oBAAuC;AAC9C,QAAM,QAAQ;AACd,MAAI,OAAO,MAAM,aAAa,cAAc,OAAO,MAAM,OAAO,YAAY;AAC1E,UAAM,IAAI,MAAM,wFAAwF;AAAA,EAC1G;AACA,SAAO,EAAE,UAAU,MAAM,UAAU,IAAI,MAAM,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a,OAAO,CAAC;AAAA,IAClF,CAAC,GAAG,OAAO;AAAA,EACb,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./conformance.js";
|
|
2
|
+
import {
|
|
3
|
+
executeConformanceRemoteOp,
|
|
4
|
+
serveConformanceRemoteOps,
|
|
5
|
+
spawnConformanceRemoteProcess
|
|
6
|
+
} from "./remote.js";
|
|
7
|
+
export {
|
|
8
|
+
executeConformanceRemoteOp,
|
|
9
|
+
serveConformanceRemoteOps,
|
|
10
|
+
spawnConformanceRemoteProcess
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/testing/index.ts"],
|
|
4
|
+
"sourcesContent": ["export * from './conformance'\nexport {\n executeConformanceRemoteOp,\n serveConformanceRemoteOps,\n spawnConformanceRemoteProcess,\n} from './remote'\nexport type {\n ConformanceRemoteRequest,\n ConformanceRemoteResponse,\n SpawnConformanceRemoteOptions,\n} from './remote'\n"],
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|