(t *testing.T)
| 1917 | } |
| 1918 | |
| 1919 | func TestWriteBufferSize(t *testing.T) { |
| 1920 | opts := GetDefaultOptions() |
| 1921 | opts.WriteBufferSize = 64 * 1024 |
| 1922 | opts.Servers = []string{"nats://127.0.0.1:4222"} |
| 1923 | nc := &Conn{Opts: opts} |
| 1924 | nc.newReaderWriter() |
| 1925 | |
| 1926 | if nc.bw.limit != 64*1024 { |
| 1927 | t.Fatalf("Expected write buffer limit of %d, got %d", 64*1024, nc.bw.limit) |
| 1928 | } |
| 1929 | if len(nc.br.buf) != defaultBufSize { |
| 1930 | t.Fatalf("Expected read buffer size of %d, got %d", defaultBufSize, len(nc.br.buf)) |
| 1931 | } |
| 1932 | } |
| 1933 | |
| 1934 | func TestWriteBufferSizeDefault(t *testing.T) { |
| 1935 | opts := GetDefaultOptions() |
nothing calls this directly
no test coverage detected