Reset and restore the test database without starting client processes
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Inspect the framework's database setup code that invokes the mysql client per scenario, likely in the Behat test bootstrap. Read #384 to capture baseline CI timings before changing anything. Done means a single persistent connection handles drop/create/restore per suite and the drafted PR shows reduced times recorded in this issue.
由索引模型根据 Issue 内容生成。
描述
The framework runs its own database bookkeeping through a new mysql client process each time. Per scenario that means a connection test and a DROP DATABASE before it starts. Scenarios that install WordPress add a CREATE DATABASE and an import of the cached install dump. Each client process costs about 25 ms before it does any work, and the import costs about 260 ms.
Steps:
- Test the database connection once per suite instead of once per scenario.
- Run the drop and create statements over a single persistent connection from the Behat process.
- Restore the cached install over that same connection.
Locally this brought a trivial query from 28 ms to 0.2 ms, and the import from 258 to 191 ms on a regular database (79 to 15 ms on an in-memory one). The database ends up in the same state as before.
Measuring: take the baseline from #384, then open a draft PR, run the same CI jobs against it and record both results here before we decide.
- 主要语言
- PHP
- 星标
- 42
- 派生
- 29
- 平均合并
- 21 小时 6 分钟
- 30 天内合并 PR
- 24
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wp-cli/wp-cli-tests 的其他 Issue
-
scope:testing status:unconfirmed
难度 2/5 1-3 小时 新手友好度 65/100
wp-cli/wp-cli-tests#389 · 1 条评论 ·
维护者通常 1 天内回复
-
os:windows scope:testing status:unconfirmed
难度 4/5 3-5 天 新手友好度 25/100
wp-cli/wp-cli-tests#427 ·
维护者通常 1 天内回复
-
bug scope:testing
难度 4/5 3-5 天 新手友好度 22/100
wp-cli/wp-cli-tests#426 ·
维护者通常 1 天内回复
-
scope:artifacts scope:distribution scope:testing
难度 4/5 3-5 天 新手友好度 25/100
wp-cli/wp-cli-tests#425 ·
维护者通常 1 天内回复
-
scope:testing
难度 5/5 一周以上 新手友好度 20/100
wp-cli/wp-cli-tests#395 ·
维护者通常 1 天内回复
查看 wp-cli/wp-cli-tests 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 3 天内回复
-
sync-en
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
[Sync EN] Formatting improvements to "Large Objects (LOBs)" docs (#6056)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭sync-en
难度 1/5 1 小时以内 新手友好度 74/100
维护者通常 1 天内回复
-
Перевод устарел
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
repo:cms
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复