Relax freshness limits and tolerate transient RCON failures
This commit is contained in:
@@ -31,14 +31,14 @@ describe('Fleet discovery and match freshness', () => {
|
||||
expect(fleetIdentity({ ...server, game_mode: 'mp' }).launch).toBeNull();
|
||||
});
|
||||
it('does not classify stale, missing, or starting occupancy as an empty lobby', () => {
|
||||
for (const change of [{ last_seen_at: iso(-46_000) }, { last_players: null }, { health: 'starting' as const }, { health: 'offline' as const }]) {
|
||||
for (const change of [{ last_seen_at: iso(-91_000) }, { last_players: null }, { health: 'starting' as const }, { health: 'offline' as const }]) {
|
||||
expect(matchesFleet({ ...server, last_players: 0, ...change }, '', 'empty', '', [], [], now)).toBe(false);
|
||||
}
|
||||
expect(matchesFleet({ ...server, last_players: 0 }, '', 'empty', '', [], [], now)).toBe(true);
|
||||
expect(matchesFleet(server, '', 'occupied', 't5', [], [], now)).toBe(false);
|
||||
});
|
||||
it('includes stale health and failed operations in attention without flagging normal startup', () => {
|
||||
expect(matchesFleet({ ...server, last_seen_at: iso(-46_000) }, '', 'attention', '', [], [], now)).toBe(true);
|
||||
expect(matchesFleet({ ...server, last_seen_at: iso(-91_000) }, '', 'attention', '', [], [], now)).toBe(true);
|
||||
expect(matchesFleet(server, '', 'attention', '', [], [{ ...operation, state: 'attention' }], now)).toBe(true);
|
||||
expect(matchesFleet({ ...server, health: 'starting' }, '', 'attention', '', [], [], now)).toBe(false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user