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

Function TestWriteBufferSizeDefault

nats_test.go:1934–1944  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1932}
1933
1934func TestWriteBufferSizeDefault(t *testing.T) {
1935 opts := GetDefaultOptions()
1936 opts.WriteBufferSize = DefaultWriteBufSize
1937 opts.Servers = []string{"nats://127.0.0.1:4222"}
1938 nc := &Conn{Opts: opts}
1939 nc.newReaderWriter()
1940
1941 if nc.bw.limit != defaultBufSize {
1942 t.Fatalf("Expected default write buffer limit of %d, got %d", defaultBufSize, nc.bw.limit)
1943 }
1944}

Callers

nothing calls this directly

Calls 3

newReaderWriterMethod · 0.95
GetDefaultOptionsFunction · 0.85
FatalfMethod · 0.80

Tested by

no test coverage detected