feat(zrpc): change NonBlock default to true following gRPC best practices (#5259)

This commit is contained in:
Kevin Wan
2025-10-26 20:56:34 +08:00
committed by GitHub
parent 98423ca948
commit d6c876860b
4 changed files with 22 additions and 1 deletions

View File

@@ -34,6 +34,13 @@ func TestWithNonBlock(t *testing.T) {
assert.True(t, options.NonBlock)
}
func TestWithBlock(t *testing.T) {
var options ClientOptions
opt := WithBlock()
opt(&options)
assert.False(t, options.NonBlock)
}
func TestWithStreamClientInterceptor(t *testing.T) {
var options ClientOptions
opt := WithStreamClientInterceptor(func(ctx context.Context, desc *grpc.StreamDesc,