Repository navigation
test: 稳定渠道亲和性测试缓存键(上游 #8009) - #174
Merged
Merged
Conversation
Replace wall-clock identifiers with an atomic sequence and test names so repeated Windows runs cannot share usage-cache entries. Verification: latest main baseline failed with cumulative counts; patched affinity tests passed -count=20; full service suite and go vet passed. Signed-off-by: sstar16 <[email protected]> (cherry picked from commit 34003e9)
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.
🔗 关联任务 / Related Issue
Closes #172
上游:QuantumNous@34003e9
🚀 变更类型 / Type of change
📝 变更描述 / Description
原样 cherry-pick 上游补丁,仅修改 service/channel_affinity_usage_cache_test.go。三个测试改用测试名和原子递增序号生成缓存键,消除低精度时钟下重复运行碰撞、统计累计的问题;保留全部断言及 fork 运行时行为。
本次移植与验证由 Codex AI 辅助完成。git 身份 woncc 与仓库历史主要贡献者一致;仍明确披露 AI 辅助。
📸 运行证明 / Proof of Work
GOMAXPROCS=2 RAYON_NUM_THREADS=2 GOWORK=off go test -p=2 ./service/ -run '^TestObserveChannelAffinityUsageCacheByRelayFormat_' -count=20 -v:退出 0,三个目标测试各通过 20 次,service 0.085s。git diff HEAD^ HEAD --check:通过;gofmt -l service/channel_affinity_usage_cache_test.go:无输出。02ba87e3c33fff81534743e749e10fc83caa97b3。✅ 提交前检查项 / Checklist