fix: close durable queue and runtime gaps
Quality / quality (ubuntu-latest) (push) Failing after 9m54s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-23 20:47:00 +05:30
parent 1a94179b5f
commit a9670c2a1c
19 changed files with 198 additions and 26 deletions
+15
View File
@@ -260,6 +260,21 @@ test("durable queue supports capacity, cancellation, and shutdown", async () =>
await expect(queue.add("work", {})).rejects.toThrow("WRN-QUEUE-CLOSED");
});
test("durable queue has no implicit capacity scan or 10k ceiling", async () => {
const base = memoryQueueStore();
let sizeCalls = 0;
const store = {
...base,
async size() {
sizeCalls++;
return 10_001;
},
};
const queue = createDurableQueue({ store });
await expect(queue.add("work", {})).resolves.toMatchObject({ name: "work" });
expect(sizeCalls).toBe(0);
});
test("force shutdown aborts an active durable job", async () => {
const store = memoryQueueStore();
const queue = createDurableQueue({ store });