test: guard hidden terminal renderer skips under load (#4767)

This commit is contained in:
Neil 2026-06-07 00:58:33 -07:00 committed by GitHub
parent dff2d02891
commit e180d137e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -474,14 +474,18 @@ test.describe('Artificial OpenCode terminal load', () => {
)
try {
const measurement = await measureTypingDuringLoad(orcaPage, scriptPath, typingPtyId, runId)
const debug = await readTerminalPtyOutputDebug(orcaPage)
const scheduler = await readTerminalOutputSchedulerDebug(orcaPage)
annotateTypingMeasurement(
testInfo,
'opencode-cross-workspace-typing',
hiddenPanes.length + 1,
measurement,
await readTerminalPtyOutputDebug(orcaPage),
await readTerminalOutputSchedulerDebug(orcaPage)
debug,
scheduler
)
expect(debug?.hiddenRendererSkipCount ?? 0).toBeGreaterThan(0)
expect(debug?.hiddenRendererSkippedChars ?? 0).toBeGreaterThan(0)
expect(measurement.medianLatencyMs).toBeLessThan(MAX_MEDIAN_KEY_LATENCY_MS)
expect(measurement.worstLatencyMs).toBeLessThan(MAX_WORST_KEY_LATENCY_MS)
expect(measurement.maxTimerDriftMs).toBeLessThan(MAX_TIMER_DRIFT_MS)