mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-04 21:15:50 +00:00
Merge branch 'fix/convo-server-message-limit' into fix/convo-mic-reconnect
This commit is contained in:
commit
880bb4eea1
1 file changed
+14
-6
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user