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

Function TestCallStream_NodeOffline

internal/nodehub/stream_test.go:131–137  ·  view source on GitHub ↗

TestCallStream_NodeOffline:未注册 nodeID → ErrNodeOffline。

(t *testing.T)

Source from the content-addressed store, hash-verified

129
130// TestCallStream_NodeOffline:未注册 nodeID → ErrNodeOffline。
131func TestCallStream_NodeOffline(t *testing.T) {
132 hub := New(Options{PeerExtractor: mdPeerExtractor})
133 _, err := hub.CallStream(context.Background(), "no-such-node", "LogsStream", nil)
134 if !errors.Is(err, ErrNodeOffline) {
135 t.Fatalf("want ErrNodeOffline, got %v", err)
136 }
137}

Callers

nothing calls this directly

Calls 2

CallStreamMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected