fix: close durable queue and runtime gaps
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user