Skip to content

tests: fix completion-order test with a single parser worker - #470

Merged
SaladDay merged 2 commits into
SaladDay:mainfrom
bryango:fix-parser-completion-order-test
Sep 29, 2026
Merged

SaladDay merged 2 commits into
SaladDay:mainfrom
bryango:fix-parser-completion-order-test

Conversation

@bryango

@bryango bryango commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

一个小小的测试bug修复:test里面并行线程数的计算方法和实际代码中的不一致 导致在2-3线程的时候 这个测试会失败

解决办法:把线程数的计算方法抽出来 作为一个单独的函数,测试里面也调用这个函数就行了

The completion-order test only skipped on single-core systems, while the parser worker pool uses half of the available parallelism. On 2-3 core builders this leaves one worker, so completion order cannot differ from input order.

Factor the worker-count calculation into a helper and use the same calculation in the test guard.

@SaladDay

Copy link
Copy Markdown
Owner

LGTM, THANKS!

@SaladDay
SaladDay merged commit b563ce1 into SaladDay:main Sep 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants