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

Function NewDefaultEConn

test/enc_test.go:32–38  ·  view source on GitHub ↗

lint:file-ignore SA1019 Ignore deprecation warnings for EncodedConn

(t *testing.T)

Source from the content-addressed store, hash-verified

30//lint:file-ignore SA1019 Ignore deprecation warnings for EncodedConn
31
32func NewDefaultEConn(t *testing.T) *nats.EncodedConn {
33 ec, err := nats.NewEncodedConn(NewConnection(t, TEST_PORT), nats.DEFAULT_ENCODER)
34 if err != nil {
35 t.Fatalf("Failed to create an encoded connection: %v\n", err)
36 }
37 return ec
38}
39
40func TestEncBuiltinConstructorErrs(t *testing.T) {
41 s := RunServerOnPort(TEST_PORT)

Calls 2

FatalfMethod · 0.80
NewConnectionFunction · 0.70

Tested by

no test coverage detected