Test timing freshness gate

- Test that capture drops generation timings once generation is idle
- Test that capture carries the engine timing averages while fresh
- Remove the hand-built idle snapshot test that passed without the gate
This commit is contained in:
Brian Neumann-Fopiano
2026-09-29 18:37:15 -04:00
parent b8433340c9
commit f46041690b
2 changed files with 30 additions and 20 deletions
@@ -97,26 +97,6 @@ public class IrisIntegrationServiceTest {
assertFalse(nether.samples().get(IntegrationMetricSchema.IRIS_PREGEN_REMAINING).available());
}
@Test
public void idleWorldsPublishGenerationTimingsAsUnavailable() {
long now = System.currentTimeMillis();
EngineTelemetrySnapshot idle = new EngineTelemetrySnapshot(
now, "minecraft:overworld", "world", "dimension", true, false, false, false,
12L, 3L, 0.25D, 20L, 20L, 0D, 0L, 2, 0, 1L, 4L, 1L, 10D, Map.of());
IrisIntegrationService service = new IrisIntegrationService(
() -> telemetry(List.of(idle), IrisTelemetrySnapshot.PregenSnapshot.INACTIVE, now)
);
IntegrationMetricSample total = service.sampleMetrics(Set.of(IntegrationMetricSchema.IRIS_GENERATION_TOTAL_MS))
.get(IntegrationMetricSchema.IRIS_GENERATION_TOTAL_MS);
IntegrationMetricSample worldTotal = service.metricGroups().get(0).samples()
.get(IntegrationMetricSchema.IRIS_GENERATION_TOTAL_MS);
assertFalse(total.available());
assertEquals("timing-not-available", total.message());
assertFalse(worldTotal.available());
}
@Test
public void publishesEveryManagedWorldWithoutAWorldCountCap() {
long now = System.currentTimeMillis();