Skip to content

Commit b68f0bd

Browse files
committed
test: give the compression e2e waits an explicit 5s timeout
vi.waitFor's default timeout is short enough to flake under CI load; match the explicit timeouts the other broker-based tests in this package use. (Copilot review feedback on #611.)
1 parent 2904d5d commit b68f0bd

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

tests/src/compression.spec.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,12 @@ describe("Compression end-to-end", () => {
132132

133133
// THEN
134134
expect(result.isOk()).toBe(true);
135-
await vi.waitFor(() => {
136-
expect(received).toHaveBeenCalledTimes(1);
137-
});
135+
await vi.waitFor(
136+
() => {
137+
expect(received).toHaveBeenCalledTimes(1);
138+
},
139+
{ timeout: 5_000 },
140+
);
138141
expect(received).toHaveBeenCalledWith(
139142
expect.objectContaining({ payload }),
140143
expect.anything(),
@@ -162,9 +165,12 @@ describe("Compression end-to-end", () => {
162165

163166
// THEN
164167
expect(result.isOk()).toBe(true);
165-
await vi.waitFor(() => {
166-
expect(received).toHaveBeenCalledTimes(1);
167-
});
168+
await vi.waitFor(
169+
() => {
170+
expect(received).toHaveBeenCalledTimes(1);
171+
},
172+
{ timeout: 5_000 },
173+
);
168174
expect(received).toHaveBeenCalledWith(
169175
expect.objectContaining({ payload }),
170176
expect.anything(),

0 commit comments

Comments
 (0)