MCPcopy
hub / github.com/grpc/grpc-go / TestJoinServerOption

Method TestJoinServerOption

default_dial_option_server_option_test.go:154–165  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

152// server option with three individual server options, and verifies that all
153// three are successfully applied.
154func (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
168func (s) TestHeaderListSizeDialOptionServerOption(t *testing.T) {

Callers

nothing calls this directly

Calls 7

NewCredentialsFunction · 0.92
newJoinServerOptionFunction · 0.85
CredsFunction · 0.85
MaxRecvMsgSizeFunction · 0.85
InitialWindowSizeFunction · 0.85
NewServerFunction · 0.70
FatalfMethod · 0.65

Tested by

no test coverage detected