2026-05-18-19-46-56 强制刷新样例视频缓存

This commit is contained in:
2026-05-18 19:52:24 +08:00
parent f89ce5f5f6
commit 72c96828d5
6 changed files with 99 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
# 测试方案
开始时间2026-05-18-19-46-56
## 测试项
- `curl -s http://127.0.0.1:8001/api/samples`,确认样例 URL 带版本参数。
- Chrome DevTools Protocol 自动点击“加载样例”。
- 检查视频元素状态:`readyState``error``videoWidth``videoHeight`
- 截图确认画面可见。
- `pytest -q`
- 使用样例视频调用 `/api/segment`
## 验收标准
- 用户点击“加载样例”后不会再拿到旧缓存视频。
- 左侧原始视频面板可见真实画面。
- 分割流程不受影响。
## 执行结果
- `/api/samples`:通过,样例 URL 已带 `?v=<mtime_ns>` 版本参数。
- Chrome DevTools Protocol 自动点击“加载样例”:通过。
- 视频元素状态:`readyState=4``error=null``videoWidth=640``videoHeight=420``currentTime=0.1`
- 点击后截图:`/tmp/isiseg_clicked_sample_after_cachefix.png`,截图中可见样例视频画面。
- `pytest -q`通过4 个测试全部通过。
- `ffprobe`:通过,样例视频为 `h264 / avc1 / yuv420p`
- `/api/segment` 使用样例视频:通过,返回 `job_id=3991537b6102` 和 3 帧结果。
- `git diff --check`:通过,无空白格式错误。