TestJoinServerOption tests the join server option. It configures a joined server option with three individual server options, and verifies that all three are successfully applied.
(t *testing.T)
| 152 | // server option with three individual server options, and verifies that all |
| 153 | // three are successfully applied. |
| 154 | func (s) TestJoinServerOption(t *testing.T) { |
| 155 | const maxRecvSize = 998765 |
| 156 | const initialWindowSize = 100 |
| 157 | jso := newJoinServerOption(Creds(insecure.NewCredentials()), MaxRecvMsgSize(maxRecvSize), InitialWindowSize(initialWindowSize)) |
| 158 | s := NewServer(jso) |
| 159 | if s.opts.maxReceiveMessageSize != maxRecvSize { |
| 160 | t.Fatalf("Unexpected s.opts.maxReceiveMessageSize: %d != %d", s.opts.maxReceiveMessageSize, maxRecvSize) |
| 161 | } |
| 162 | if s.opts.initialWindowSize != initialWindowSize { |
| 163 | t.Fatalf("Unexpected s.opts.initialWindowSize: %d != %d", s.opts.initialWindowSize, initialWindowSize) |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | // funcTestHeaderListSizeDialOptionServerOption tests |
| 168 | func (s) TestHeaderListSizeDialOptionServerOption(t *testing.T) { |
nothing calls this directly
no test coverage detected