Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Side by Side Diff: third_party/grpc/doc/interop-test-descriptions.md

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/grpc/doc/health-checking.md ('k') | third_party/grpc/doc/load-balancing.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 Interoperability Test Case Descriptions
2 =======================================
3
4 Client and server use
5 [test.proto](../src/proto/grpc/testing/test.proto)
6 and the [gRPC over HTTP/2 v2 protocol](./PROTOCOL-HTTP2.md).
7
8 Client
9 ------
10
11 Clients implement test cases that test certain functionally. Each client is
12 provided the test case it is expected to run as a command-line parameter. Names
13 should be lowercase and without spaces.
14
15 Clients should accept these arguments:
16 * --server_host=HOSTNAME
17 * The server host to connect to. For example, "localhost" or "127.0.0.1"
18 * --server_host_override=HOSTNAME
19 * The server host to claim to be connecting to, for use in TLS and HTTP/2
20 :authority header. If unspecified, the value of --server_host will be
21 used
22 * --server_port=PORT
23 * The server port to connect to. For example, "8080"
24 * --test_case=TESTCASE
25 * The name of the test case to execute. For example, "empty_unary"
26 * --use_tls=BOOLEAN
27 * Whether to use a plaintext or encrypted connection
28 * --use_test_ca=BOOLEAN
29 * Whether to replace platform root CAs with
30 [ca.pem](https://github.com/grpc/grpc/blob/master/src/core/tsi/test_creds/ ca.pem)
31 as the CA root
32 * --default_service_account=ACCOUNT_EMAIL
33 * Email of the GCE default service account. Only applicable
34 for compute_engine_creds test.
35 * --oauth_scope=SCOPE
36 * OAuth scope. For example, "https://www.googleapis.com/auth/xapi.zoo"
37 * --service_account_key_file=PATH
38 * The path to the service account JSON key file generated from GCE developer
39 console.
40
41 Clients must support TLS with ALPN. Clients must not disable certificate
42 checking.
43
44 ### empty_unary
45
46 This test verifies that implementations support zero-size messages. Ideally,
47 client implementations would verify that the request and response were zero
48 bytes serialized, but this is generally prohibitive to perform, so is not
49 required.
50
51 Server features:
52 * [EmptyCall][]
53
54 Procedure:
55 1. Client calls EmptyCall with the default Empty message
56
57 Client asserts:
58 * call was successful
59 * response is non-null
60
61 *It may be possible to use UnaryCall instead of EmptyCall, but it is harder to
62 ensure that the proto serialized to zero bytes.*
63
64 ### large_unary
65
66 This test verifies unary calls succeed in sending messages, and touches on flow
67 control (even if compression is enabled on the channel).
68
69 Server features:
70 * [UnaryCall][]
71 * [Compressable Payload][]
72
73 Procedure:
74 1. Client calls UnaryCall with:
75
76 ```
77 {
78 response_type: COMPRESSABLE
79 response_size: 314159
80 payload:{
81 body: 271828 bytes of zeros
82 }
83 }
84 ```
85
86 Client asserts:
87 * call was successful
88 * response payload type is COMPRESSABLE
89 * response payload body is 314159 bytes in size
90 * clients are free to assert that the response payload body contents are zero
91 and comparing the entire response message against a golden response
92
93 ### large_compressed_unary
94
95 This test verifies compressed unary calls succeed in sending messages. It
96 sends one unary request for every combination of compression algorithm and
97 payload type.
98
99 In all scenarios, whether compression was actually performed is determined by
100 the compression bit in the response's message flags. The response's compression
101 value indicates which algorithm was used if said compression bit is set.
102
103
104 Server features:
105 * [UnaryCall][]
106 * [Compressable Payload][]
107 * [Uncompressable Payload][]
108 * [Random Payload][]
109
110 Procedure:
111 1. Client calls UnaryCall with:
112
113 ```
114 {
115 response_compression: <one of {NONE, GZIP, DEFLATE}>
116 response_type: COMPRESSABLE
117 response_size: 314159
118 payload:{
119 body: 271828 bytes of zeros
120 }
121 }
122 ```
123 Client asserts:
124 * call was successful
125 * response payload type is COMPRESSABLE
126 * response compression is consistent with the requested one.
127 * if `response_compression == NONE`, the response MUST NOT have the
128 compressed message flag set.
129 * if `response_compression != NONE`, the response MUST have the compressed
130 message flag set.
131 * response payload body is 314159 bytes in size
132 * clients are free to assert that the response payload body contents are
133 zero and comparing the entire response message against a golden response
134
135
136 2. Client calls UnaryCall with:
137 ```
138 {
139 response_compression: <one of {NONE, GZIP, DEFLATE}>
140 response_type: UNCOMPRESSABLE
141 response_size: 314159
142 payload:{
143 body: 271828 bytes of zeros
144 }
145 }
146 ```
147 Client asserts:
148 * call was successful
149 * response payload type is UNCOMPRESSABLE
150 * response compression is consistent with the requested one.
151 * the response MUST NOT have the compressed message flag set.
152 * response payload body is 314159 bytes in size
153 * clients are free to assert that the response payload body contents are
154 identical to the golden uncompressable data at `test/cpp/interop/rnd.dat`.
155
156
157 3. Client calls UnaryCall with:
158 ```
159 {
160 response_compression: <one of {NONE, GZIP, DEFLATE}>
161 response_type: RANDOM
162 response_size: 314159
163 payload:{
164 body: 271828 bytes of zeros
165 }
166 }
167 ```
168 Client asserts:
169 * call was successful
170 * response payload type is either COMPRESSABLE or UNCOMPRESSABLE
171 * the behavior is consistent with the randomly chosen incoming payload type,
172 as described in their respective sections.
173
174 ### client_streaming
175
176 This test verifies that client-only streaming succeeds.
177
178 Server features:
179 * [StreamingInputCall][]
180 * [Compressable Payload][]
181
182 Procedure:
183 1. Client calls StreamingInputCall
184 2. Client sends:
185
186 ```
187 {
188 payload:{
189 body: 27182 bytes of zeros
190 }
191 }
192 ```
193
194 3. Client then sends:
195
196 ```
197 {
198 payload:{
199 body: 8 bytes of zeros
200 }
201 }
202 ```
203
204 4. Client then sends:
205
206 ```
207 {
208 payload:{
209 body: 1828 bytes of zeros
210 }
211 }
212 ```
213
214 5. Client then sends:
215
216 ```
217 {
218 payload:{
219 body: 45904 bytes of zeros
220 }
221 }
222 ```
223
224 6. Client half-closes
225
226 Client asserts:
227 * call was successful
228 * response aggregated_payload_size is 74922
229
230 ### server_streaming
231
232 This test verifies that server-only streaming succeeds.
233
234 Server features:
235 * [StreamingOutputCall][]
236 * [Compressable Payload][]
237
238 Procedure:
239 1. Client calls StreamingOutputCall with:
240
241 ```
242 {
243 response_type:COMPRESSABLE
244 response_parameters:{
245 size: 31415
246 }
247 response_parameters:{
248 size: 9
249 }
250 response_parameters:{
251 size: 2653
252 }
253 response_parameters:{
254 size: 58979
255 }
256 }
257 ```
258
259 Client asserts:
260 * call was successful
261 * exactly four responses
262 * response payloads are COMPRESSABLE
263 * response payload bodies are sized (in order): 31415, 9, 2653, 58979
264 * clients are free to assert that the response payload body contents are zero
265 and comparing the entire response messages against golden responses
266
267 ### server_compressed_streaming
268
269 This test verifies that server-only compressed streaming succeeds.
270
271 Server features:
272 * [StreamingOutputCall][]
273 * [Compressable Payload][]
274 * [Uncompressable Payload][]
275 * [Random Payload][]
276
277
278 Procedure:
279 1. Client calls StreamingOutputCall with:
280
281 ```
282 {
283 response_compression: <one of {NONE, GZIP, DEFLATE}>
284 response_type:COMPRESSABLE
285 response_parameters:{
286 size: 31415
287 }
288 response_parameters:{
289 size: 9
290 }
291 response_parameters:{
292 size: 2653
293 }
294 response_parameters:{
295 size: 58979
296 }
297 }
298 ```
299
300 Client asserts:
301 * call was successful
302 * exactly four responses
303 * response payloads are COMPRESSABLE
304 * response compression is consistent with the requested one.
305 * if `response_compression == NONE`, the response MUST NOT have the
306 compressed message flag set.
307 * if `response_compression != NONE`, the response MUST have the compressed
308 message flag set.
309 * response payload bodies are sized (in order): 31415, 9, 2653, 58979
310 * clients are free to assert that the response payload body contents are
311 zero and comparing the entire response messages against golden responses
312
313
314 2. Client calls StreamingOutputCall with:
315
316 ```
317 {
318 response_compression: <one of {NONE, GZIP, DEFLATE}>
319 response_type:UNCOMPRESSABLE
320 response_parameters:{
321 size: 31415
322 }
323 response_parameters:{
324 size: 9
325 }
326 response_parameters:{
327 size: 2653
328 }
329 response_parameters:{
330 size: 58979
331 }
332 }
333 ```
334
335 Client asserts:
336 * call was successful
337 * exactly four responses
338 * response payloads are UNCOMPRESSABLE
339 * response compressions are consistent with the requested one.
340 * the responses MUST NOT have the compressed message flag set.
341 * response payload bodies are sized (in order): 31415, 9, 2653, 58979
342 * clients are free to assert that the body of the responses are identical to
343 the golden uncompressable data at `test/cpp/interop/rnd.dat`.
344
345
346 3. Client calls StreamingOutputCall with:
347
348 ```
349 {
350 response_compression: <one of {NONE, GZIP, DEFLATE}>
351 response_type:RANDOM
352 response_parameters:{
353 size: 31415
354 }
355 response_parameters:{
356 size: 9
357 }
358 response_parameters:{
359 size: 2653
360 }
361 response_parameters:{
362 size: 58979
363 }
364 }
365 ```
366
367 Client asserts:
368 * call was successful
369 * response payload type is either COMPRESSABLE or UNCOMPRESSABLE
370 * the behavior is consistent with the randomly chosen incoming payload type,
371 as described in their respective sections.
372
373 ### ping_pong
374
375 This test verifies that full duplex bidi is supported.
376
377 Server features:
378 * [FullDuplexCall][]
379 * [Compressable Payload][]
380
381 Procedure:
382 1. Client calls FullDuplexCall with:
383
384 ```
385 {
386 response_type: COMPRESSABLE
387 response_parameters:{
388 size: 31415
389 }
390 payload:{
391 body: 27182 bytes of zeros
392 }
393 }
394 ```
395
396 2. After getting a reply, it sends:
397
398 ```
399 {
400 response_type: COMPRESSABLE
401 response_parameters:{
402 size: 9
403 }
404 payload:{
405 body: 8 bytes of zeros
406 }
407 }
408 ```
409
410 3. After getting a reply, it sends:
411
412 ```
413 {
414 response_type: COMPRESSABLE
415 response_parameters:{
416 size: 2653
417 }
418 payload:{
419 body: 1828 bytes of zeros
420 }
421 }
422 ```
423
424 4. After getting a reply, it sends:
425
426 ```
427 {
428 response_type: COMPRESSABLE
429 response_parameters:{
430 size: 58979
431 }
432 payload:{
433 body: 45904 bytes of zeros
434 }
435 }
436 ```
437
438 5. After getting a reply, client half-closes
439
440 Client asserts:
441 * call was successful
442 * exactly four responses
443 * response payloads are COMPRESSABLE
444 * response payload bodies are sized (in order): 31415, 9, 2653, 58979
445 * clients are free to assert that the response payload body contents are zero
446 and comparing the entire response messages against golden responses
447
448 ### empty_stream
449
450 This test verifies that streams support having zero-messages in both
451 directions.
452
453 Server features:
454 * [FullDuplexCall][]
455
456 Procedure:
457 1. Client calls FullDuplexCall and then half-closes
458
459 Client asserts:
460 * call was successful
461 * exactly zero responses
462
463 ### compute_engine_creds
464
465 This test is only for cloud-to-prod path.
466
467 This test verifies unary calls succeed in sending messages while using Service
468 Credentials from GCE metadata server. The client instance needs to be created
469 with desired oauth scope.
470
471 The test uses `--default_service_account` with GCE service account email and
472 `--oauth_scope` with the OAuth scope to use. For testing against
473 grpc-test.sandbox.googleapis.com, "https://www.googleapis.com/auth/xapi.zoo" sho uld
474 be passed in as `--oauth_scope`.
475
476 Server features:
477 * [UnaryCall][]
478 * [Compressable Payload][]
479 * [Echo Authenticated Username][]
480 * [Echo OAuth Scope][]
481
482 Procedure:
483 1. Client configures channel to use GCECredentials
484 2. Client calls UnaryCall on the channel with:
485
486 ```
487 {
488 response_type: COMPRESSABLE
489 response_size: 314159
490 payload:{
491 body: 271828 bytes of zeros
492 }
493 fill_username: true
494 fill_oauth_scope: true
495 }
496 ```
497
498 Client asserts:
499 * call was successful
500 * received SimpleResponse.username equals the value of `--default_service_accoun t` flag
501 * received SimpleResponse.oauth_scope is in `--oauth_scope`
502 * response payload body is 314159 bytes in size
503 * clients are free to assert that the response payload body contents are zero
504 and comparing the entire response message against a golden response
505
506 ### jwt_token_creds
507
508 This test is only for cloud-to-prod path.
509
510 This test verifies unary calls succeed in sending messages while using JWT
511 token (created by the project's key file)
512
513 Test caller should set flag `--service_account_key_file` with the
514 path to json key file downloaded from
515 https://console.developers.google.com. Alternately, if using a
516 usable auth implementation, she may specify the file location in the environment
517 variable GOOGLE_APPLICATION_CREDENTIALS.
518
519 Server features:
520 * [UnaryCall][]
521 * [Compressable Payload][]
522 * [Echo Authenticated Username][]
523 * [Echo OAuth Scope][]
524
525 Procedure:
526 1. Client configures the channel to use JWTTokenCredentials
527 2. Client calls UnaryCall with:
528
529 ```
530 {
531 response_type: COMPRESSABLE
532 response_size: 314159
533 payload:{
534 body: 271828 bytes of zeros
535 }
536 fill_username: true
537 }
538 ```
539
540 Client asserts:
541 * call was successful
542 * received SimpleResponse.username is not empty and is in the json key file used
543 by the auth library. The client can optionally check the username matches the
544 email address in the key file or equals the value of `--default_service_account` flag.
545 * response payload body is 314159 bytes in size
546 * clients are free to assert that the response payload body contents are zero
547 and comparing the entire response message against a golden response
548
549 ### oauth2_auth_token
550
551 This test is only for cloud-to-prod path and some implementations may run
552 in GCE only.
553
554 This test verifies unary calls succeed in sending messages using an OAuth2 token
555 that is obtained out of band. For the purpose of the test, the OAuth2 token is
556 actually obtained from a service account credentials or GCE credentials via the
557 language-specific authorization library.
558
559 The difference between this test and the other auth tests is that it
560 first uses the authorization library to obtain an authorization token.
561
562 The test
563 - uses the flag `--service_account_key_file` with the path to a json key file
564 downloaded from https://console.developers.google.com. Alternately, if using a
565 usable auth implementation, it may specify the file location in the environment
566 variable GOOGLE_APPLICATION_CREDENTIALS, *OR* if GCE credentials is used to
567 fetch the token, `--default_service_account` can be used to pass in GCE service
568 account email.
569 - uses the flag `--oauth_scope` for the oauth scope. For testing against
570 grpc-test.sandbox.googleapis.com, "https://www.googleapis.com/auth/xapi.zoo" sho uld
571 be passed as the `--oauth_scope`.
572
573 Server features:
574 * [UnaryCall][]
575 * [Compressable Payload][]
576 * [Echo Authenticated Username][]
577 * [Echo OAuth Scope][]
578
579 Procedure:
580 1. Client uses the auth library to obtain an authorization token
581 2. Client configures the channel to use AccessTokenCredentials with the access token obtained in step 1
582 3. Client calls UnaryCall with the following message
583
584 ```
585 {
586 fill_username: true
587 fill_oauth_scope: true
588 }
589 ```
590
591 Client asserts:
592 * call was successful
593 * received SimpleResponse.username is valid. Depending on whether a service
594 account key file or GCE credentials was used, client should check against the
595 json key file or GCE default service account email.
596 * received SimpleResponse.oauth_scope is in `--oauth_scope`
597
598 ### per_rpc_creds
599
600 Similar to the other auth tests, this test is only for cloud-to-prod path.
601
602 This test verifies unary calls succeed in sending messages using a JWT or a serv ice account
603 credentials set on the RPC.
604
605 The test
606 - uses the flag `--service_account_key_file` with the path to a json key file
607 downloaded from https://console.developers.google.com. Alternately, if using a
608 usable auth implementation, it may specify the file location in the environment
609 variable GOOGLE_APPLICATION_CREDENTIALS
610 - optionally uses the flag `--oauth_scope` for the oauth scope if implementator
611 wishes to use service account credential instead of JWT credential. For testing
612 against grpc-test.sandbox.googleapis.com, oauth scope
613 "https://www.googleapis.com/auth/xapi.zoo" should be used.
614
615 Server features:
616 * [UnaryCall][]
617 * [Compressable Payload][]
618 * [Echo Authenticated Username][]
619 * [Echo OAuth Scope][]
620
621 Procedure:
622 1. Client configures the channel with just SSL credentials
623 2. Client calls UnaryCall, setting per-call credentials to
624 JWTTokenCredentials. The request is the following message
625
626 ```
627 {
628 fill_username: true
629 }
630 ```
631
632 Client asserts:
633 * call was successful
634 * received SimpleResponse.username is not empty and is in the json key file used
635 by the auth library. The client can optionally check the username matches the
636 email address in the key file.
637
638
639 ### custom_metadata
640
641 This test verifies that custom metadata in either binary or ascii format can be
642 sent as initial-metadata by the client and as both initial- and trailing-metadat a
643 by the server.
644
645 Server features:
646 * [UnaryCall][]
647 * [FullDuplexCall][]
648 * [Compressable Payload][]
649 * [Echo Metadata][]
650
651 Procedure:
652 1. The client attaches custom metadata with the following keys and values:
653
654 ```
655 key: "x-grpc-test-echo-initial", value: "test_initial_metadata_value"
656 key: "x-grpc-test-echo-trailing-bin", value: 0xababab
657 ```
658
659 to a UnaryCall with request:
660
661 ```
662 {
663 response_type: COMPRESSABLE
664 response_size: 314159
665 payload:{
666 body: 271828 bytes of zeros
667 }
668 }
669 ```
670
671 2. The client attaches custom metadata with the following keys and values:
672
673 ```
674 key: "x-grpc-test-echo-initial", value: "test_initial_metadata_value"
675 key: "x-grpc-test-echo-trailing-bin", value: 0xababab
676 ```
677
678 to a FullDuplexCall with request:
679
680 ```
681 {
682 response_type: COMPRESSABLE
683 response_size: 314159
684 payload:{
685 body: 271828 bytes of zeros
686 }
687 }
688 ```
689
690 and then half-closes
691
692 Client asserts:
693 * call was successful
694 * metadata with key `"x-grpc-test-echo-initial"` and value
695 `"test_initial_metadata_value"`is received in the initial metadata for calls
696 in Procedure steps 1 and 2.
697 * metadata with key `"x-grpc-test-echo-trailing-bin"` and value `0xababab` is
698 received in the trailing metadata for calls in Procedure steps 1 and 2.
699
700
701
702 ### status_code_and_message
703
704 This test verifies unary calls succeed in sending messages, and propagate back
705 status code and message sent along with the messages.
706
707 Server features:
708 * [UnaryCall][]
709 * [FullDuplexCall][]
710 * [Echo Status][]
711
712 Procedure:
713 1. Client calls UnaryCall with:
714
715 ```
716 {
717 response_status:{
718 code: 2
719 message: "test status message"
720 }
721 }
722 ```
723
724 2. Client calls FullDuplexCall with:
725
726 ```
727 {
728 response_status:{
729 code: 2
730 message: "test status message"
731 }
732 }
733 ```
734
735 and then half-closes
736
737
738 Client asserts:
739 * received status code is the same as the sent code for both Procedure steps 1
740 and 2
741 * received status message is the same as the sent message for both Procedure
742 steps 1 and 2
743
744 ### unimplemented_method
745
746 Status: Ready for implementation. Blocking beta.
747
748 This test verifies calling unimplemented RPC method returns the UNIMPLEMENTED st atus code.
749
750 Server features:
751 N/A
752
753 Procedure:
754 * Client calls `grpc.testing.UnimplementedService/UnimplementedCall` with an
755 empty request (defined as `grpc.testing.Empty`):
756
757 ```
758 {
759 }
760 ```
761
762 Client asserts:
763 * received status code is 12 (UNIMPLEMENTED)
764 * received status message is empty or null/unset
765
766 ### cancel_after_begin
767
768 This test verifies that a request can be cancelled after metadata has been sent
769 but before payloads are sent.
770
771 Server features:
772 * [StreamingInputCall][]
773
774 Procedure:
775 1. Client starts StreamingInputCall
776 2. Client immediately cancels request
777
778 Client asserts:
779 * Call completed with status CANCELLED
780
781 ### cancel_after_first_response
782
783 This test verifies that a request can be cancelled after receiving a message
784 from the server.
785
786 Server features:
787 * [FullDuplexCall][]
788 * [Compressable Payload][]
789
790 Procedure:
791 1. Client starts FullDuplexCall with
792
793 ```
794 {
795 response_type: COMPRESSABLE
796 response_parameters:{
797 size: 31415
798 }
799 payload:{
800 body: 27182 bytes of zeros
801 }
802 }
803 ```
804
805 2. After receiving a response, client cancels request
806
807 Client asserts:
808 * Call completed with status CANCELLED
809
810 ### timeout_on_sleeping_server
811
812 This test verifies that an RPC request whose lifetime exceeds its configured
813 timeout value will end with the DeadlineExceeded status.
814
815 Server features:
816 * [FullDuplexCall][]
817
818 Procedure:
819 1. Client calls FullDuplexCall with the following request and sets its timeout
820 to 1ms
821
822 ```
823 {
824 payload:{
825 body: 27182 bytes of zeros
826 }
827 }
828 ```
829
830 2. Client waits
831
832 Client asserts:
833 * Call completed with status DEADLINE_EXCEEDED.
834
835 ### concurrent_large_unary
836
837 Status: TODO
838
839 Client performs 1000 large_unary tests in parallel on the same channel.
840
841 ### Flow control. Pushback at client for large messages (TODO: fix name)
842
843 Status: TODO
844
845 This test verifies that a client sending faster than a server can drain sees
846 pushback (i.e., attempts to send succeed only after appropriate delays).
847
848 ### TODO Tests
849
850 #### High priority:
851
852 Propagation of status code and message (yangg)
853
854 Multiple thousand simultaneous calls on same Channel (ctiller)
855
856 Metadata: client headers, server headers + trailers, binary+ascii
857
858 #### Normal priority:
859
860 Cancel before start (ctiller)
861
862 Cancel after sent first message (ctiller)
863
864 Cancel after received headers (ctiller)
865
866 Timeout but completed before expire (zhaoq)
867
868 Multiple thousand simultaneous calls timeout on same Channel (ctiller)
869
870 #### Lower priority:
871
872 Flow control. Pushback at client for large messages (abhishek)
873
874 Flow control. Pushback at server for large messages (abhishek)
875
876 Going over max concurrent streams doesn't fail (client controls itself)
877 (abhishek)
878
879 RPC method not implemented (yangg)
880
881 Multiple thousand simultaneous calls on different Channels (ctiller)
882
883 Failed TLS hostname verification (ejona?)
884
885 Large amount of headers to cause CONTINUATIONs; 63K of 'X's, all in one header.
886
887 #### To priorize:
888
889 Start streaming RPC but don't send any requests, server responds
890
891 ### Postponed Tests
892
893 Resilience to buggy servers: These tests would verify that a client application
894 isn't affected negatively by the responses put on the wire by a buggy server
895 (e.g. the client library won't make the application crash).
896
897 Reconnect after transport failure
898
899 Reconnect backoff
900
901 Fuzz testing
902
903
904 Server
905 ------
906
907 Servers implement various named features for clients to test with. Server
908 features are orthogonal. If a server implements a feature, it is always
909 available for clients. Names are simple descriptions for developer
910 communication and tracking.
911
912 Servers should accept these arguments:
913
914 * --port=PORT
915
916 * The port to listen on. For example, "8080"
917
918 * --use_tls=BOOLEAN
919
920 * Whether to use a plaintext or encrypted connection
921
922 Servers must support TLS with ALPN. They should use
923 [server1.pem](https://github.com/grpc/grpc/blob/master/src/core/tsi/test_creds/s erver1.pem)
924 for their certificate.
925
926 ### EmptyCall
927 [EmptyCall]: #emptycall
928
929 Server implements EmptyCall which immediately returns the empty message.
930
931 ### UnaryCall
932 [UnaryCall]: #unarycall
933
934 Server implements UnaryCall which immediately returns a SimpleResponse with a
935 payload body of size SimpleRequest.response_size bytes and type as appropriate
936 for the SimpleRequest.response_type. If the server does not support the
937 response_type, then it should fail the RPC with INVALID_ARGUMENT.
938
939 ### StreamingInputCall
940 [StreamingInputCall]: #streaminginputcall
941
942 Server implements StreamingInputCall which upon half close immediately returns
943 a StreamingInputCallResponse where aggregated_payload_size is the sum of all
944 request payload bodies received.
945
946 ### StreamingOutputCall
947 [StreamingOutputCall]: #streamingoutputcall
948
949 Server implements StreamingOutputCall by replying, in order, with one
950 StreamingOutputCallResponses for each ResponseParameters in
951 StreamingOutputCallRequest. Each StreamingOutputCallResponses should have a
952 payload body of size ResponseParameters.size bytes, as specified by its
953 respective ResponseParameters. After sending all responses, it closes with OK.
954
955 ### FullDuplexCall
956 [FullDuplexCall]: #fullduplexcall
957
958 Server implements FullDuplexCall by replying, in order, with one
959 StreamingOutputCallResponses for each ResponseParameters in each
960 StreamingOutputCallRequest. Each StreamingOutputCallResponses should have a
961 payload body of size ResponseParameters.size bytes, as specified by its
962 respective ResponseParameters. After receiving half close and sending all
963 responses, it closes with OK.
964
965 ### Compressable Payload
966 [Compressable Payload]: #compressable-payload
967
968 When the client requests COMPRESSABLE payload, the response includes a payload
969 of the size requested containing all zeros and the payload type is
970 COMPRESSABLE.
971
972 ### Uncompressable Payload
973 [Uncompressable Payload]: #uncompressable-payload
974
975 When the client requests UNCOMPRESSABLE payload, the response includes a payload
976 of the size requested containing uncompressable data and the payload type is
977 UNCOMPRESSABLE. A 512 kB dump from /dev/urandom is the current golden data,
978 stored at `test/cpp/interop/rnd.dat`
979
980 ### Random Payload
981 [Random Payload]: #random-payload
982
983 When the client requests RANDOM payload, the response includes either a randomly
984 chosen COMPRESSABLE or UNCOMPRESSABLE payload. The data and the payload type
985 will be consistent with this choice.
986
987 ### Echo Status
988 [Echo Status]: #echo-status
989 When the client sends a response_status in the request payload, the server close s
990 the stream with the status code and messsage contained within said response_stat us.
991 The server will not process any further messages on the stream sent by the clien t.
992 This can be used by clients to verify correct handling of different status codes and
993 associated status messages end-to-end.
994
995 ### Echo Metadata
996 [Echo Metadata]: #echo-metadata
997 When the client sends metadata with the key `"x-grpc-test-echo-initial"` with it s
998 request, the server sends back exactly this key and the corresponding value back to
999 the client as part of initial metadata. When the client sends metadata with the key
1000 `"x-grpc-test-echo-trailing-bin"` with its request, the server sends back exactl y this
1001 key and the corresponding value back to the client as trailing metadata.
1002
1003 ### Observe ResponseParameters.interval_us
1004 [Observe ResponseParameters.interval_us]: #observe-responseparametersinterval_us
1005
1006 In StreamingOutputCall and FullDuplexCall, server delays sending a
1007 StreamingOutputCallResponse by the ResponseParameters's interval_us for that
1008 particular response, relative to the last response sent. That is, interval_us
1009 acts like a sleep *before* sending the response and accumulates from one
1010 response to the next.
1011
1012 Interaction with flow control is unspecified.
1013
1014 ### Echo Auth Information
1015
1016 Status: Pending
1017
1018 #### Echo Authenticated Username
1019 [Echo Authenticated Username]: #echo-authenticated-username
1020
1021 If a SimpleRequest has fill_username=true and that request was successfully
1022 authenticated, then the SimpleResponse should have username filled with the
1023 canonical form of the authenticated source. The canonical form is dependent on
1024 the authentication method, but is likely to be a base 10 integer identifier or
1025 an email address.
1026
1027 #### Echo OAuth scope
1028 [Echo OAuth Scope]: #echo-oauth-scope
1029
1030 If a SimpleRequest has fill_oauth_scope=true and that request was successfully
1031 authenticated via OAuth, then the SimpleResponse should have oauth_scope filled
1032 with the scope of the method being invoked.
1033
1034 Although a general server-side feature, most test servers won't implement this
1035 feature. The TLS server grpc-test.sandbox.googleapis.com:443 supports this featu re.
1036 It requires at least the OAuth scope
1037 `https://www.googleapis.com/auth/xapi.zoo` for authentication to succeed.
1038
1039 Discussion:
1040
1041 Ideally, this would be communicated via metadata and not in the
1042 request/response, but we want to use this test in code paths that don't yet
1043 fully communicate metadata.
1044
OLDNEW
« no previous file with comments | « third_party/grpc/doc/health-checking.md ('k') | third_party/grpc/doc/load-balancing.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698