test: stabilize MPMC test etcd access via PyO3 rather than pylib etcd3#33
Merged
Conversation
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.
PR Description EN
Background
The MPMC integration test was flaky because its test control-
plane logic used the Python
etcd3client directly. In CI,that client occasionally failed to connect to etcd or hit
transient
UNAVAILABLE/ timeout errors, even when the actualMPMC produce/consume flow had already succeeded.
Summary
This PR moves the MPMC test control-plane etcd operations to
the PyO3-backed etcd client, so tests reuse the same Tokio
runtime and etcd client lifecycle used by Fluxon runtime code.
Changes
operations.
etcd3usage in MPMC tests with the PyO3etcd client.
test_lib.py.RwLockforcached client access.
child log tails.
Validation
fluxon_pyo3etcd tests passed.PR 文案 CN
背景
MPMC 集成测试之前存在偶发失败:测试控制面直接使用 Python
etcd3client 访问 etcd。在 CI 环境里,这个 client 偶尔会连接不上 etcd,或者遇到 transient
UNAVAILABLE/ timeout 错误。失败发生时,实际 MPMC produce/consume 流程经常已经成功,问题主要
出在测试侧 etcd 控制面访问不稳定。
概述
这个 PR 将 MPMC 测试控制面的 etcd 访问切到 PyO3 暴露的 etcd
client,让测试复用 Fluxon runtime 使用的 Tokio runtime 和 etcd
client 生命周期管理。
主要改动
etcd3。test_lib.py。RwLock管理cached client。
tail。
验证
fluxon_pyo3etcd 单测通过。