Cache prepared statements per database connection

This commit is contained in:
2026-10-05 15:24:17 -04:00
parent 239eceb779
commit 2af768011a
4 changed files with 70 additions and 2 deletions
+5 -1
View File
@@ -15,7 +15,11 @@ vi.mock('../../src/lib/server/integrations/komodo.js', () => ({
}));
vi.mock('../../src/lib/server/integrations/rcon.js', () => ({
rconGetPlayerCount: vi.fn(async () => 0),
rconPlutoniumVersion: vi.fn(async () => ({ revision: 5354, error: null })),
rconPlutoniumVersion: vi.fn(async () => {
// Version evidence must be observed strictly after the launch timestamp.
await new Promise(resolve => setTimeout(resolve, 2));
return { revision: 5354, error: null };
}),
rconStatusResult: vi.fn(async (server: string) => ({ ok: true, endpoint: { host: 'localhost', port: 28960 }, rawReply: '',
status: { players: 0, map: server.startsWith('t6_') ? 'zm_transit' : server.includes('_moon_') ? 'zombie_moon' : 'zombie_theater', gametype: null, roster: [] } }))
}));