Skip to content

test(rpcinfo): cover frozen RPCInfo after recycle#1969

Open
Haihan-Jiang wants to merge 1 commit into
cloudwego:mainfrom
Haihan-Jiang:codex/kitex-1958-freeze-rpcinfo-recycle
Open

test(rpcinfo): cover frozen RPCInfo after recycle#1969
Haihan-Jiang wants to merge 1 commit into
cloudwego:mainfrom
Haihan-Jiang:codex/kitex-1958-freeze-rpcinfo-recycle

Conversation

@Haihan-Jiang

Copy link
Copy Markdown

What

Adds regression coverage for the documented async-safe FreezeRPCInfo path related to #1958. The test freezes an RPCInfo, returns the original pooled value with PutRPCInfo, and verifies that the frozen copy still retains endpoint, invocation, and timeout configuration values while omitting stats.

Why

Issue #1958 discusses the risk of keeping GetRPCInfo(ctx) references past the request lifecycle when rpcinfo pooling is enabled. This test locks down the expected behavior for the safer frozen snapshot path.

Tests

  • go test ./pkg/rpcinfo
  • go test -race ./pkg/rpcinfo

@Haihan-Jiang Haihan-Jiang requested review from a team as code owners June 14, 2026 08:06
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants