MCPcopy
hub / github.com/nats-io/nats.go / jsClient

Function jsClient

test/kv_test.go:1206–1214  ·  view source on GitHub ↗
(t *testing.T, s *server.Server, opts ...nats.Option)

Source from the content-addressed store, hash-verified

1204}
1205
1206func jsClient(t *testing.T, s *server.Server, opts ...nats.Option) (*nats.Conn, nats.JetStreamContext) {
1207 t.Helper()
1208 nc := client(t, s, opts...)
1209 js, err := nc.JetStream(nats.MaxWait(10 * time.Second))
1210 if err != nil {
1211 t.Fatalf("Unexpected error getting JetStream context: %v", err)
1212 }
1213 return nc, js
1214}
1215
1216func expectOk(t *testing.T, err error) {
1217 t.Helper()

Calls 3

JetStreamMethod · 0.80
FatalfMethod · 0.80
clientFunction · 0.70

Tested by

no test coverage detected