[Feature] 统一 hosted 调试初始化超时测试到确定性触发通道并清理 debugInitializeWindow
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Start with watchDebugInitialize in desktop/internal/workbench/debug_start.go and find where App.debugInitializeTrigger is read and closed in app.go. Move TestDebugTCPAdapterThatNeverInitializesTimesOut in debug_tcp_test.go and TestDebugHostedAdapterThatNeverAnswersIsRecordedAsATimeout in debug_adapter_start_test.go onto that trigger, then grep the repo for other debugInitializeWindow uses. Done when both tests pass without the 300ms timer and the field is removed if nothing else reads it.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem to solve / 要解决的问题
desktop/internal/workbench 中仍有两项既有的 hosted 调试初始化超时测试依赖固定实时定时器 h.app.debugInitializeWindow = 300 * time.Millisecond:
desktop/internal/workbench/debug_tcp_test.go:TestDebugTCPAdapterThatNeverInitializesTimesOutdesktop/internal/workbench/debug_adapter_start_test.go:TestDebugHostedAdapterThatNeverAnswersIsRecordedAsATimeout
两处通过 300ms 真实计时器触发 watchDebugInitialize(desktop/internal/workbench/debug_start.go),在慢速 CI 机器或竞态检测下每次测试至少等待 300ms,并且存在 beginDebug / serveHostedAdapter 建连与 300ms 定时器竞争的风险,同时使得 App.debugInitializeWindow(desktop/internal/workbench/app.go)继续作为第二套测试超时控制机制与 App.debugInitializeTrigger 并存。
Proposed solution / 建议方案
将 TestDebugTCPAdapterThatNeverInitializesTimesOut 和 TestDebugHostedAdapterThatNeverAnswersIsRecordedAsATimeout 统一迁移到确定性触发通道 App.debugInitializeTrigger(在确认 serveHostedAdapter 收到连接且会话进入初始化后关闭触发通道),并随后检查全仓库是否仍有其他 debugInitializeWindow 调用方;若无剩余调用方,一并清理 App.debugInitializeWindow 字段及其读取分支。
Target platform / 目标平台
Cross-platform / 跨平台
Area / 模块
Debug / 调试
Priority / 优先级
P2 / 后续考虑:目前不着急,可安排到后续版本
Alternatives considered / 已考虑的替代方案
继续保持两项 hosted 超时测试使用 debugInitializeWindow = 300 * time.Millisecond,仅在发生慢机超时误报时临时放大窗口;但这不符合 write-stable-tests 的确定性同步原则,也会保留两套测试超时控制字段。
Additional context / 补充信息
- 相关代码位置:
desktop/internal/workbench/app.go:App.debugInitializeWindow、App.debugInitializeTriggerdesktop/internal/workbench/debug_start.go:watchDebugInitializedesktop/internal/workbench/debug_tcp_test.go:TestDebugTCPAdapterThatNeverInitializesTimesOutdesktop/internal/workbench/debug_adapter_start_test.go:TestDebugHostedAdapterThatNeverAnswersIsRecordedAsATimeout
- 来源:#1962 / PR #2341 审查时按
develop-lithe第九节记录既有的独立可重构项,未在同一 PR 中顺手修改无关测试。
Checklist / 提交前检查
- I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复建议。
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.8k
- Forks
- 151
- Merge medio
- 3 h 48 min
- PR fusionados (30 d)
- 571
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de 1lck/Lithe-IDEA
-
review: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
1lck/Lithe-IDEA#2432 ·
Los mantenedores suelen responder en 1 día
-
review: medium
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
1lck/Lithe-IDEA#2431 ·
Los mantenedores suelen responder en 1 día
-
refactor review: high
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
1lck/Lithe-IDEA#2376 ·
Los mantenedores suelen responder en 1 día
-
area:ui enhancement P2 platform:cross-platform refactor review: high
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
1lck/Lithe-IDEA#2365 ·
Los mantenedores suelen responder en 1 día
-
review: medium
Dificultad 3/5 1-2 días Aptitud para principiantes 57/100
1lck/Lithe-IDEA#2434 ·
Los mantenedores suelen responder en 1 día
Todos los issues de 1lck/Lithe-IDEA
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
posit-dev/positron-sas-extension#196 ·
Los mantenedores suelen responder en 1 día
-
bug composer
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
inmanta/web-console#8037 ·
Los mantenedores suelen responder en 1 día
-
Add: AlFajer Palestine FHDAbiertocheck:passed streams:add
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
bug: v5 dist/types/components.d.ts imports @stencil/core/runtime instead of ./stencil-public-runtimeAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día