Share one loaded editor across the read-only VS Code e2e tests

未关闭
#6,147 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 4 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript, vscode
领域
testing-qa

调研方向

Start with find_references.spec.ts and the openServerPage helper it calls, then check how go_to_definition.spec.ts, hints.spec.ts, completions.spec.ts and the default lineage test copy examples/sushi and open pages. Share one copied sushi directory and one loaded page across the read-only tests, resetting the references panel and cursor between them, while tests that write files or stop the server keep their own. Done when those read-only files open the editor once, the mutating tests still get a fresh page, and find_references.spec.ts runs noticeably faster.

由索引模型根据 Issue 内容生成。

描述

Improvement Project: VSCode Extension Tech Debt

Why this exists

find_references.spec.ts runs 13 tests serially in one Playwright worker, and each test copies examples/sushi and calls openServerPage. That call loads a new browser page, which reloads the VS Code workbench and starts a new sqlmesh_lsp before the test clicks around a model.

None of those tests write a file, and go-to-definition, hints, completions, and the default lineage test do the same read of sushi.

The code-server process is already shared per worker, while the workbench and the loaded SQLMesh context are not. Sharing the temp directory only saves the sushi copy, which is a few seconds. Sharing the page removes 12 reloads of 21–39 seconds each, about five minutes off that file, and the CI job will get shorter by that amount when this file is the one the other workers are waiting on.

This is separate from the virtualenv work in #6098, because these tests already use the repo .venv.

What to change

Copy sushi once and open it once in find_references.spec.ts, go_to_definition.spec.ts, hints.spec.ts, completions.spec.ts, and the default lineage test. Tests that write files, stop the server, or assert on their own virtualenv should keep a fresh directory and a fresh page, and a shared page needs its references panel and cursor reset between tests.

Done when

  • Those read-only files load the editor once, the mutating tests still get their own page, and find_references.spec.ts passes several minutes faster.
主要语言
Python
星标
3.3k
派生
471
平均合并
6 天 7 小时
30 天内合并 PR
35

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

SQLMesh/sqlmesh 的其他 Issue

查看 SQLMesh/sqlmesh 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。