Skip to content

Commit a374c3a

Browse files
committed
test(matrix): stabilize thread binding sweep persistence
1 parent 89c69c4 commit a374c3a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

extensions/matrix/src/matrix/thread-bindings.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,14 @@ describe("matrix thread bindings", () => {
330330
placement: "current",
331331
});
332332

333+
const sendCallCount = sendMessageMatrixMock.mock.calls.length;
333334
await vi.advanceTimersByTimeAsync(61_000);
334335

335336
await vi.waitFor(
336-
() => expect(sendMessageMatrixMock.mock.calls.length).toBeGreaterThanOrEqual(2),
337+
() =>
338+
expect(sendMessageMatrixMock.mock.calls.length).toBeGreaterThanOrEqual(sendCallCount + 2),
337339
{
338-
interval: 1,
340+
interval: 10,
339341
timeout: 1_000,
340342
},
341343
);
@@ -346,7 +348,7 @@ describe("matrix thread bindings", () => {
346348
expect(persisted.version).toBe(1);
347349
expect(persisted.bindings).toEqual([]);
348350
},
349-
{ interval: 1, timeout: 100 },
351+
{ interval: 10, timeout: 1_000 },
350352
);
351353
} finally {
352354
vi.useRealTimers();

0 commit comments

Comments
 (0)