Repository navigation
diag(ui): 记录 Node 期限瞬间的子进程状态 (#144) - #241
Merged
Merged
Conversation
The node fixture now uses Popen so a timeout reports spawn_seconds, pid, exit_at_timeout and partial_stdout_bytes alongside the preload checkpoint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
内容
给 #144 的 Node 夹具补上期限瞬间的子进程状态(与 #40 的夹具一致的思路,但不改 10 秒期限):
Popen+communicate(timeout=10),记录spawn_seconds(Popen返回到 communicate 开始之间的父进程耗时);pid、spawn_seconds、exit_at_timeout(poll(),None= 仍在运行)、partial_stdout_bytes;OSError,例如进程无法创建)单独给出node fixture could not be created: …。这样下一次命中时可直接区分三种情形:
OSErrorspawn_seconds很大exit_at_timeout=None验证
python -m unittest research.ui.test_raster_style_reference→ 11 tests OK(顺带补上漏掉的import time)。边界
spawn_seconds只是Popen到communicate之间的差值,不等于完整创建耗时,仅作相对指示。Refs #144