| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.6"/>
- <title>GRPC C++: Negative HTTP/2 Interop Test Case Descriptions</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/search.js"></script>
- <script type="text/javascript">
- $(document).ready(function() { searchBox.OnSelectItem(0); });
- </script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td style="padding-left: 0.5em;">
- <div id="projectname">GRPC C++
-  <span id="projectnumber">1.2.0</span>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.6 -->
- <script type="text/javascript">
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- </script>
- <div id="navrow1" class="tabs">
- <ul class="tablist">
- <li><a href="index.html"><span>Main Page</span></a></li>
- <li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
- <li><a href="modules.html"><span>Modules</span></a></li>
- <li><a href="namespaces.html"><span>Namespaces</span></a></li>
- <li><a href="annotated.html"><span>Data Structures</span></a></li>
- <li><a href="files.html"><span>Files</span></a></li>
- <li>
- <div id="MSearchBox" class="MSearchBoxInactive">
- <span class="left">
- <img id="MSearchSelect" src="search/mag_sel.png"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- alt=""/>
- <input type="text" id="MSearchField" value="Search" accesskey="S"
- onfocus="searchBox.OnSearchFieldFocus(true)"
- onblur="searchBox.OnSearchFieldFocus(false)"
- onkeyup="searchBox.OnSearchFieldChange(event)"/>
- </span><span class="right">
- <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
- </span>
- </div>
- </li>
- </ul>
- </div>
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(12)"><span class="SelectionMark"> </span>Pages</a></div>
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
- </div><!-- top -->
- <div class="header">
- <div class="headertitle">
- <div class="title">Negative HTTP/2 Interop Test Case Descriptions </div> </div>
- </div><!--header-->
- <div class="contents">
- <div class="textblock"><p>Client and server use <a href="../src/proto/grpc/testing/test.proto">test.proto</a>.</p>
- <h2>Server </h2>
- <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>
- <p>Server should accept these arguments:</p>
- <ul>
- <li>–port=PORT<ul>
- <li>The port the server will run on. For example, "8080"</li>
- </ul>
- </li>
- <li>–test_case=TESTCASE<ul>
- <li>The name of the test case to execute. For example, "goaway"</li>
- </ul>
- </li>
- </ul>
- <h2>Client </h2>
- <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>
- <p>Clients should accept these arguments:</p>
- <ul>
- <li>–server_host=HOSTNAME<ul>
- <li>The server host to connect to. For example, "localhost" or "127.0.0.1"</li>
- </ul>
- </li>
- <li>–server_port=PORT<ul>
- <li>The server port to connect to. For example, "8080"</li>
- </ul>
- </li>
- <li>–test_case=TESTCASE<ul>
- <li>The name of the test case to execute. For example, "goaway"</li>
- </ul>
- </li>
- </ul>
- <h2>Note </h2>
- <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>
- <h2>Test Cases</h2>
- <h3>goaway</h3>
- <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>
- <p>Client Procedure:</p>
- <ol type="1">
- <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>
- <p class="startli">``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```</p>
- </li>
- </ol>
- <p>Client asserts:</p>
- <ul>
- <li>Both calls are successful.</li>
- <li>Response payload body is 314159 bytes in size.</li>
- </ul>
- <p>Server Procedure:</p>
- <ol type="1">
- <li>Server sends a GOAWAY after receiving the first UnaryCall.</li>
- </ol>
- <p>Server asserts:</p>
- <ul>
- <li>Two different connections were used from the client.</li>
- </ul>
- <h3>rst_after_header</h3>
- <p>This test verifies that the client fails correctly when the server sends a RST_STREAM immediately after sending headers to the client.</p>
- <p>Procedure:</p>
- <ol type="1">
- <li><p class="startli">Client sends UnaryCall with:</p>
- <p class="startli">``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```</p>
- </li>
- </ol>
- <p>Client asserts:</p>
- <ul>
- <li>Call was not successful.</li>
- </ul>
- <p>Server Procedure:</p>
- <ol type="1">
- <li>Server sends a RST_STREAM with error code 0 after sending headers to the client.</li>
- </ol>
- <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>
- <h3>rst_during_data</h3>
- <p>This test verifies that the client fails "correctly" when the server sends a RST_STREAM halfway through sending data to the client.</p>
- <p>Procedure:</p>
- <ol type="1">
- <li><p class="startli">Client sends UnaryCall with:</p>
- <p class="startli">``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```</p>
- </li>
- </ol>
- <p>Client asserts:</p>
- <ul>
- <li>Call was not successful.</li>
- </ul>
- <p>Server Procedure:</p>
- <ol type="1">
- <li>Server sends a RST_STREAM with error code 0 after sending half of the requested data to the client.</li>
- </ol>
- <h3>rst_after_data</h3>
- <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>
- <p>Procedure:</p>
- <ol type="1">
- <li><p class="startli">Client sends UnaryCall with:</p>
- <p class="startli">``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```</p>
- </li>
- </ol>
- <p>Client asserts:</p>
- <ul>
- <li>Call was not successful.</li>
- </ul>
- <p>Server Procedure:</p>
- <ol type="1">
- <li>Server sends a RST_STREAM with error code 0 after sending all of the data to the client.</li>
- </ol>
- <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>
- <h3>ping</h3>
- <p>This test verifies that the client correctly acknowledges all pings it gets from the server.</p>
- <p>Procedure:</p>
- <ol type="1">
- <li><p class="startli">Client sends UnaryCall with:</p>
- <p class="startli">``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```</p>
- </li>
- </ol>
- <p>Client asserts:</p>
- <ul>
- <li>call was successful.</li>
- <li>response payload body is 314159 bytes in size.</li>
- </ul>
- <p>Server Procedure:</p>
- <ol type="1">
- <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>
- <li>Server sends pings before and after sending headers, also before and after sending data.</li>
- </ol>
- <p>Server Asserts:</p>
- <ul>
- <li>Number of outstanding pings is 0 when the connection is lost.</li>
- </ul>
- <h3>max_streams</h3>
- <p>This test verifies that the client observes the MAX_CONCURRENT_STREAMS limit set by the server.</p>
- <p>Client Procedure:</p>
- <ol type="1">
- <li>Client sends initial UnaryCall to allow the server to update its MAX_CONCURRENT_STREAMS settings.</li>
- <li>Client concurrently sends 10 UnaryCalls.</li>
- </ol>
- <p>Client Asserts:</p>
- <ul>
- <li>All UnaryCalls were successful, and had the correct type and payload size.</li>
- </ul>
- <p>Server Procedure:</p>
- <ol type="1">
- <li>Sets MAX_CONCURRENT_STREAMS to one after the connection is made.</li>
- </ol>
- <p><em>The assertion that the MAX_CONCURRENT_STREAMS limit is upheld occurs in the http2 library we used.</em> </p>
- </div></div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated on Mon Mar 20 2017 15:38:31 for GRPC C++ by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.6
- </small></address>
- </body>
- </html>
|