Relax freshness limits and tolerate transient RCON failures
This commit is contained in:
@@ -96,7 +96,7 @@ describe('durable beta test plans', () => {
|
||||
it('uses script events instead of logs and keeps match progress across app restarts', async () => {
|
||||
await postTelemetry(gameEvent('game_end'));
|
||||
const id = await openPlan({ ...defaultPlan(), requirements: [requirement('matches', 'matches')] });
|
||||
await tick(46); await tick();
|
||||
await tick(91); await tick();
|
||||
const { testView } = await import('../../src/lib/server/fleet/beta-tests.js');
|
||||
await appendFile(join(fixture.t5, names[0], 'logs/games_sp.log'), 'InitGame:\n 0:00 J;new;1;Josh\nExitLevel: executed\n');
|
||||
await tick();
|
||||
@@ -113,7 +113,7 @@ describe('durable beta test plans', () => {
|
||||
it('automatically credits ordinary rounds only to active deployed beta servers', async () => {
|
||||
const id = await openPlan({ ...defaultPlan(), waveSize: 1, requirements: [requirement('round', 'round')] }, names);
|
||||
await postTelemetry(gameEvent('round_change'));
|
||||
await tick(46); await tick();
|
||||
await tick(91); await tick();
|
||||
const { testView } = await import('../../src/lib/server/fleet/beta-tests.js');
|
||||
expect(testView(id)?.servers[0].progress[0].current).toBe(0);
|
||||
await postTelemetry(gameEvent('round_change', 99, 4, names[1]));
|
||||
@@ -135,7 +135,7 @@ describe('durable beta test plans', () => {
|
||||
const first = currentRun(id, names[0])!;
|
||||
expect(testView(id)?.servers[0].progress[0].current).toBe(0);
|
||||
await postTelemetry(gameEvent('game_start'));
|
||||
await tick(46); await tick();
|
||||
await tick(91); await tick();
|
||||
expect(currentRun(id, names[0])?.id).not.toBe(first.id);
|
||||
expect(currentRun(id, names[0])?.phase).toBe(1);
|
||||
expect(testView(id)?.servers[0].progress[0].current).toBe(0);
|
||||
@@ -162,7 +162,7 @@ describe('durable beta test plans', () => {
|
||||
await tick(15, 0, false);
|
||||
// Fresh occupied telemetry remains healthy despite an RCON timeout.
|
||||
expect(getBeta(id)?.state).toBe('ready-promote');
|
||||
await tick(31, 0, false);
|
||||
await tick(61, 0, false);
|
||||
expect(getBeta(id)?.state).toBe('running');
|
||||
await expect(promoteBeta(id)).rejects.toThrow();
|
||||
});
|
||||
@@ -236,7 +236,7 @@ describe('durable beta test plans', () => {
|
||||
expect(retry.status).toBe(200);
|
||||
await postTelemetry(gameEvent('round_change'));
|
||||
expect(testView(id)?.servers).toHaveLength(0);
|
||||
await tick(46); await tick();
|
||||
await tick(91); await tick();
|
||||
expect(testView(id)?.servers[0].progress[0].current).toBe(0);
|
||||
await postTelemetry(gameEvent('round_change'));
|
||||
expect(testView(id)?.servers[0].progress[0].current).toBe(25);
|
||||
|
||||
Reference in New Issue
Block a user