Relax freshness limits and tolerate transient RCON failures
This commit is contained in:
@@ -114,7 +114,7 @@ describe('Watchdog detection and ownership', () => {
|
||||
await watchdog.watchdogTick();
|
||||
expect(onlyIncident()).toMatchObject({ failures: 1, last_seen_at: first.last_seen_at });
|
||||
expect(komodo.komodoInspectHealthy).toHaveBeenCalledTimes(1);
|
||||
advance(60_000);
|
||||
advance(90_001);
|
||||
await pollStatus();
|
||||
await watchdog.watchdogTick();
|
||||
expect(onlyIncident()).toMatchObject({ failures: 1, first_seen_at: new Date().toISOString() });
|
||||
@@ -168,6 +168,7 @@ describe('Watchdog detection and ownership', () => {
|
||||
expect(incidents()).toEqual([]);
|
||||
expect(rcon.rconStatusResult).not.toHaveBeenCalled();
|
||||
vi.mocked(rcon.rconStatusResult).mockResolvedValue(missingRcon);
|
||||
advance(30_001);
|
||||
await pollStatus();
|
||||
advance(30_000);
|
||||
database.db().prepare("DELETE FROM settings WHERE key='watchdog_last_scan'").run();
|
||||
@@ -310,7 +311,7 @@ describe('Watchdog detection and ownership', () => {
|
||||
await watchdog.watchdogTick(true);
|
||||
expect(incidents()).toEqual([]);
|
||||
expect(rcon.rconStatusResult).not.toHaveBeenCalled();
|
||||
advance(60_000);
|
||||
advance(90_001);
|
||||
await watchdog.watchdogTick(true);
|
||||
expect(onlyIncident()).toMatchObject({ kind: 'health', state: 'open', failures: 1 });
|
||||
saveTelemetry({ ...gameEvent('heartbeat', 18, 4, server), receivedAt: new Date().toISOString() });
|
||||
|
||||
Reference in New Issue
Block a user