Skip to content

Commit 9dac2e3

Browse files
Caneryycursoragent
andcommitted
test(stream): use unique txHash and assert replay resolves
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b4cb661 commit 9dac2e3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

backend/tests/integration/stream-lifecycle.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,10 +607,11 @@ describe("Stream Lifecycle Integration Tests", () => {
607607

608608
it("dedupes worker replay of the same event without creating a second row", async () => {
609609
const streamId = 12;
610-
const event = createStreamCreatedEvent(streamId);
610+
const txHash = "worker-replay-dedup-tx-hash";
611+
const event = { ...createStreamCreatedEvent(streamId), txHash };
611612

612613
await worker.processEvent(event);
613-
await worker.processEvent(event);
614+
await expect(worker.processEvent(event)).resolves.toBeUndefined();
614615

615616
const count = await testPrisma.streamEvent.count({
616617
where: {

0 commit comments

Comments
 (0)