Merge branch 'fix/convo-server-message-limit' into fix/convo-mic-reconnect

This commit is contained in:
404oops committed 2026-10-31 17:08:18 +01:00
commit 880bb4eea1
1 file changed
+14 -6
+14 -6
View File
@@ -465,18 +465,26 @@ describe('convo built SDK and browser media', () => {
const warn = vi.spyOn(console, 'warn');
try {
await conversation.connect();
auth.mockRejectedValueOnce(new Error('auth store unavailable'));
// Every lookup fails, the SDK's own socket.io connection included,
// until the relay has refused a reconnect attempt on one.
auth.mockRejectedValue(new Error('auth store unavailable'));
for (const socket of proxied) socket.destroy();
await vi.waitFor(
() =>
expect(warn).toHaveBeenCalledWith(
'[realtime] credential lookup failed',
expect.objectContaining({
message: 'auth store unavailable',
}),
),
{ timeout: 10_000 },
);
auth.mockRestore();
await log.until(() =>
log.events.some(
(event) => event.type === 'ready' && event.reconnected,
),
);
// The first attempt failed its lookup, a later one went through.
expect(warn).toHaveBeenCalledWith(
'[realtime] credential lookup failed',
expect.objectContaining({ message: 'auth store unavailable' }),
);
expect(log.count('reconnecting')).toBe(1);
conversation.sendText('Still there?');
await log.until(() => log.count('turn.done') === 1);