Relax freshness limits and tolerate transient RCON failures
This commit is contained in:
@@ -9,10 +9,10 @@ it('keeps healthy reports online across polling and delivery delays, then expire
|
||||
vi.useFakeTimers();
|
||||
const reportAt = Date.parse('2026-09-18T12:00:00Z');
|
||||
const timestamp = new Date(reportAt).toISOString();
|
||||
for (const elapsed of [-999, 0, STATUS_REFRESH_MS, STATUS_REFRESH_MS + 4000, 45_000, 45_001]) {
|
||||
for (const elapsed of [-999, 0, STATUS_REFRESH_MS, STATUS_REFRESH_MS + 4000, 45_000, 60_000, 90_000, 90_001, 120_000]) {
|
||||
const now = reportAt + elapsed;
|
||||
vi.setSystemTime(now);
|
||||
const expected = elapsed <= 45_000;
|
||||
const expected = elapsed <= 90_000;
|
||||
const health = classifyHealth(timestamp, null, 'running');
|
||||
expect(health).toBe(expected ? 'online' : 'stale');
|
||||
expect(freshServer({ health, last_seen_at: timestamp, last_error: null } as FleetServer, now)).toBe(expected);
|
||||
|
||||
Reference in New Issue
Block a user