md_doc_negative-http2-interop-test-descriptions.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.6"/>
  7. <title>GRPC C++: Negative HTTP/2 Interop Test Case Descriptions</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/search.js"></script>
  13. <script type="text/javascript">
  14. $(document).ready(function() { searchBox.OnSelectItem(0); });
  15. </script>
  16. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  17. </head>
  18. <body>
  19. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  20. <div id="titlearea">
  21. <table cellspacing="0" cellpadding="0">
  22. <tbody>
  23. <tr style="height: 56px;">
  24. <td style="padding-left: 0.5em;">
  25. <div id="projectname">GRPC C++
  26. &#160;<span id="projectnumber">1.2.0</span>
  27. </div>
  28. </td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. <!-- end header part -->
  34. <!-- Generated by Doxygen 1.8.6 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  41. <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  42. <li><a href="modules.html"><span>Modules</span></a></li>
  43. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  44. <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
  45. <li><a href="files.html"><span>Files</span></a></li>
  46. <li>
  47. <div id="MSearchBox" class="MSearchBoxInactive">
  48. <span class="left">
  49. <img id="MSearchSelect" src="search/mag_sel.png"
  50. onmouseover="return searchBox.OnSearchSelectShow()"
  51. onmouseout="return searchBox.OnSearchSelectHide()"
  52. alt=""/>
  53. <input type="text" id="MSearchField" value="Search" accesskey="S"
  54. onfocus="searchBox.OnSearchFieldFocus(true)"
  55. onblur="searchBox.OnSearchFieldFocus(false)"
  56. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  57. </span><span class="right">
  58. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  59. </span>
  60. </div>
  61. </li>
  62. </ul>
  63. </div>
  64. <!-- window showing the filter options -->
  65. <div id="MSearchSelectWindow"
  66. onmouseover="return searchBox.OnSearchSelectShow()"
  67. onmouseout="return searchBox.OnSearchSelectHide()"
  68. onkeydown="return searchBox.OnSearchSelectKey(event)">
  69. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(12)"><span class="SelectionMark">&#160;</span>Pages</a></div>
  70. <!-- iframe showing the search results (closed by default) -->
  71. <div id="MSearchResultsWindow">
  72. <iframe src="javascript:void(0)" frameborder="0"
  73. name="MSearchResults" id="MSearchResults">
  74. </iframe>
  75. </div>
  76. </div><!-- top -->
  77. <div class="header">
  78. <div class="headertitle">
  79. <div class="title">Negative HTTP/2 Interop Test Case Descriptions </div> </div>
  80. </div><!--header-->
  81. <div class="contents">
  82. <div class="textblock"><p>Client and server use <a href="../src/proto/grpc/testing/test.proto">test.proto</a>.</p>
  83. <h2>Server </h2>
  84. <p>The code for the custom http2 server can be found <a href="https://github.com/grpc/grpc/tree/master/test/http2_test">here</a>. It is responsible for handling requests and sending responses, and also for fulfilling the behavior of each particular test case.</p>
  85. <p>Server should accept these arguments:</p>
  86. <ul>
  87. <li>&ndash;port=PORT<ul>
  88. <li>The port the server will run on. For example, "8080"</li>
  89. </ul>
  90. </li>
  91. <li>&ndash;test_case=TESTCASE<ul>
  92. <li>The name of the test case to execute. For example, "goaway"</li>
  93. </ul>
  94. </li>
  95. </ul>
  96. <h2>Client </h2>
  97. <p>Clients implement test cases that test certain functionality. Each client is provided the test case it is expected to run as a command-line parameter. Names should be lowercase and without spaces.</p>
  98. <p>Clients should accept these arguments:</p>
  99. <ul>
  100. <li>&ndash;server_host=HOSTNAME<ul>
  101. <li>The server host to connect to. For example, "localhost" or "127.0.0.1"</li>
  102. </ul>
  103. </li>
  104. <li>&ndash;server_port=PORT<ul>
  105. <li>The server port to connect to. For example, "8080"</li>
  106. </ul>
  107. </li>
  108. <li>&ndash;test_case=TESTCASE<ul>
  109. <li>The name of the test case to execute. For example, "goaway"</li>
  110. </ul>
  111. </li>
  112. </ul>
  113. <h2>Note </h2>
  114. <p>Note that the server and client must be invoked with the same test case or else the test will be meaningless. For convenience, we provide a shell script wrapper that invokes both server and client at the same time, with the same test_case. This is the preferred way to run these tests.</p>
  115. <h2>Test Cases</h2>
  116. <h3>goaway</h3>
  117. <p>This test verifies that the client correctly responds to a goaway sent by the server. The client should handle the goaway by switching to a new stream without the user application having to do a thing.</p>
  118. <p>Client Procedure:</p>
  119. <ol type="1">
  120. <li><p class="startli">Client sends two UnaryCall requests (and sleeps for 1 second in-between). TODO: resolve <a href="https://github.com/grpc/grpc/issues/9300">9300</a> and remove the 1 second sleep</p>
  121. <p class="startli">``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```</p>
  122. </li>
  123. </ol>
  124. <p>Client asserts:</p>
  125. <ul>
  126. <li>Both calls are successful.</li>
  127. <li>Response payload body is 314159 bytes in size.</li>
  128. </ul>
  129. <p>Server Procedure:</p>
  130. <ol type="1">
  131. <li>Server sends a GOAWAY after receiving the first UnaryCall.</li>
  132. </ol>
  133. <p>Server asserts:</p>
  134. <ul>
  135. <li>Two different connections were used from the client.</li>
  136. </ul>
  137. <h3>rst_after_header</h3>
  138. <p>This test verifies that the client fails correctly when the server sends a RST_STREAM immediately after sending headers to the client.</p>
  139. <p>Procedure:</p>
  140. <ol type="1">
  141. <li><p class="startli">Client sends UnaryCall with:</p>
  142. <p class="startli">``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```</p>
  143. </li>
  144. </ol>
  145. <p>Client asserts:</p>
  146. <ul>
  147. <li>Call was not successful.</li>
  148. </ul>
  149. <p>Server Procedure:</p>
  150. <ol type="1">
  151. <li>Server sends a RST_STREAM with error code 0 after sending headers to the client.</li>
  152. </ol>
  153. <p><em>At the moment the error code and message returned are not standardized throughout all languages. Those checks will be added once all client languages behave the same way. <a href="https://github.com/grpc/grpc/issues/9142">#9142</a> is in flight.</em></p>
  154. <h3>rst_during_data</h3>
  155. <p>This test verifies that the client fails "correctly" when the server sends a RST_STREAM halfway through sending data to the client.</p>
  156. <p>Procedure:</p>
  157. <ol type="1">
  158. <li><p class="startli">Client sends UnaryCall with:</p>
  159. <p class="startli">``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```</p>
  160. </li>
  161. </ol>
  162. <p>Client asserts:</p>
  163. <ul>
  164. <li>Call was not successful.</li>
  165. </ul>
  166. <p>Server Procedure:</p>
  167. <ol type="1">
  168. <li>Server sends a RST_STREAM with error code 0 after sending half of the requested data to the client.</li>
  169. </ol>
  170. <h3>rst_after_data</h3>
  171. <p>This test verifies that the client fails "correctly" when the server sends a RST_STREAM after sending all of the data to the client.</p>
  172. <p>Procedure:</p>
  173. <ol type="1">
  174. <li><p class="startli">Client sends UnaryCall with:</p>
  175. <p class="startli">``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```</p>
  176. </li>
  177. </ol>
  178. <p>Client asserts:</p>
  179. <ul>
  180. <li>Call was not successful.</li>
  181. </ul>
  182. <p>Server Procedure:</p>
  183. <ol type="1">
  184. <li>Server sends a RST_STREAM with error code 0 after sending all of the data to the client.</li>
  185. </ol>
  186. <p><em>Certain client languages allow the data to be accessed even though a RST_STREAM was encountered. Once all client languages behave this way, checks will be added on the incoming data.</em></p>
  187. <h3>ping</h3>
  188. <p>This test verifies that the client correctly acknowledges all pings it gets from the server.</p>
  189. <p>Procedure:</p>
  190. <ol type="1">
  191. <li><p class="startli">Client sends UnaryCall with:</p>
  192. <p class="startli">``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```</p>
  193. </li>
  194. </ol>
  195. <p>Client asserts:</p>
  196. <ul>
  197. <li>call was successful.</li>
  198. <li>response payload body is 314159 bytes in size.</li>
  199. </ul>
  200. <p>Server Procedure:</p>
  201. <ol type="1">
  202. <li>Server tracks the number of outstanding pings (i.e. +1 when it sends a ping, and -1 when it receives an ack from the client).</li>
  203. <li>Server sends pings before and after sending headers, also before and after sending data.</li>
  204. </ol>
  205. <p>Server Asserts:</p>
  206. <ul>
  207. <li>Number of outstanding pings is 0 when the connection is lost.</li>
  208. </ul>
  209. <h3>max_streams</h3>
  210. <p>This test verifies that the client observes the MAX_CONCURRENT_STREAMS limit set by the server.</p>
  211. <p>Client Procedure:</p>
  212. <ol type="1">
  213. <li>Client sends initial UnaryCall to allow the server to update its MAX_CONCURRENT_STREAMS settings.</li>
  214. <li>Client concurrently sends 10 UnaryCalls.</li>
  215. </ol>
  216. <p>Client Asserts:</p>
  217. <ul>
  218. <li>All UnaryCalls were successful, and had the correct type and payload size.</li>
  219. </ul>
  220. <p>Server Procedure:</p>
  221. <ol type="1">
  222. <li>Sets MAX_CONCURRENT_STREAMS to one after the connection is made.</li>
  223. </ol>
  224. <p><em>The assertion that the MAX_CONCURRENT_STREAMS limit is upheld occurs in the http2 library we used.</em> </p>
  225. </div></div><!-- contents -->
  226. <!-- start footer part -->
  227. <hr class="footer"/><address class="footer"><small>
  228. Generated on Mon Mar 20 2017 15:38:31 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
  229. <img class="footer" src="doxygen.png" alt="doxygen"/>
  230. </a> 1.8.6
  231. </small></address>
  232. </body>
  233. </html>