mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-30 04:19:27 +00:00
test(sync): allow repeated relay e2e startup
This commit is contained in:
+2
-1
@@ -1137,7 +1137,8 @@ export async function stopServerForTests() {
|
||||
peerJoinLocks.clear();
|
||||
clearRateLimitMaps();
|
||||
healthResponseCache.clear();
|
||||
io.removeAllListeners();
|
||||
// Keep the server's connection handler installed so an E2E process can
|
||||
// stop and restart this singleton relay for a later isolated scenario.
|
||||
io.disconnectSockets(true);
|
||||
Object.assign(rateLimitDenied, { connections: 0, events: 0, health: 0, adminMetricsAuth: 0, roomList: 0, leaveRoom: 0 });
|
||||
if (!httpServer.listening) return;
|
||||
|
||||
@@ -422,7 +422,10 @@ test('recovers relay ROOM_DATA through background retries into the packed player
|
||||
const attempts = Number(video.dataset.koalaCanonicalPlayAttempts || '0') + 1;
|
||||
video.dataset.koalaCanonicalPlayAttempts = String(attempts);
|
||||
if (attempts === 1) {
|
||||
return Promise.reject(new DOMException('audit autoplay rejection', 'NotAllowedError'));
|
||||
return Promise.reject(Object.assign(
|
||||
new Error('audit autoplay rejection'),
|
||||
{ name: 'NotAllowedError' }
|
||||
));
|
||||
}
|
||||
return nativePlay();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user