test: fix gRPC TestClientMix data race #1561
Merged
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.
What type of PR is this?
test
Check the PR title.
(Optional) Translate the PR title into Chinese.
test: 修复 gRPC
TestClientMix
数据竞争问题(Optional) More detailed description for this PR(en: English/zh: Chinese).
en:
When server.start and server.stop are executed concurrently, it is possible to cause concurrent reads and writes to the eventloop field.
The eventloop field is assigned a value before execution is allowed to continue.
Unit Test context: https://github.com/cloudwego/kitex/actions/runs/11010654292/job/30573068741?pr=1559
zh(optional):
当 server.start 与 server.stop 并发执行时,有可能造成 eventloop 字段的并发读写。
eventloop 字段赋值后才允许继续执行。
单测错误上下文:https://github.com/cloudwego/kitex/actions/runs/11010654292/job/30573068741?pr=1559
(Optional) Which issue(s) this PR fixes:
(optional) The PR that updates user documentation: