Search in sources :

Example 1 with DataWriter

use of org.apache.catalina.nonblocking.TestNonBlockingAPI.DataWriter in project tomcat by apache.

the class TesterAjpNonBlockingClient method doTestAJPNonBlockingRead.

@Test
public void doTestAJPNonBlockingRead() throws Exception {
    Map<String, List<String>> resHeaders = new HashMap<>();
    ByteChunk out = new ByteChunk();
    int rc = postUrl(true, new DataWriter(2000), "http://localhost" + "/examples/servlets/nonblocking/bytecounter", out, resHeaders, null);
    System.out.println(out.toString());
    Assert.assertEquals(HttpServletResponse.SC_OK, rc);
}
Also used : HashMap(java.util.HashMap) ByteChunk(org.apache.tomcat.util.buf.ByteChunk) List(java.util.List) DataWriter(org.apache.catalina.nonblocking.TestNonBlockingAPI.DataWriter) TomcatBaseTest(org.apache.catalina.startup.TomcatBaseTest) Test(org.junit.Test)

Aggregations

HashMap (java.util.HashMap)1 List (java.util.List)1 DataWriter (org.apache.catalina.nonblocking.TestNonBlockingAPI.DataWriter)1 TomcatBaseTest (org.apache.catalina.startup.TomcatBaseTest)1 ByteChunk (org.apache.tomcat.util.buf.ByteChunk)1 Test (org.junit.Test)1