MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / dial

Method dial

internal/nodehub/hub_test.go:69–81  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

67}
68
69func (e *testEnv) dial(t *testing.T) *grpc.ClientConn {
70 t.Helper()
71 cc, err := grpc.NewClient(
72 "passthrough:///bufnet",
73 grpc.WithContextDialer(e.dialFn),
74 grpc.WithTransportCredentials(insecure.NewCredentials()),
75 )
76 if err != nil {
77 t.Fatalf("dial: %v", err)
78 }
79 t.Cleanup(func() { _ = cc.Close() })
80 return cc
81}
82
83// nodeMock 模拟一个 node 客户端,启动一个 Session 流,可注册 method handler。
84type nodeMock struct {

Calls 2

CleanupMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected