]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: test-http-payload: Amend shared client tests to do both download and echo...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Wed, 13 Dec 2017 16:27:10 +0000 (17:27 +0100)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Wed, 13 Dec 2017 21:18:37 +0000 (22:18 +0100)
Also, the original download tests were named wrong.

src/lib-http/test-http-payload.c

index 8d6d6cbf39369d24663956ee2c1de262d1d09b81..d8f0fc819bb871d6f0db1f4bf0d39c75d3a02278 100644 (file)
@@ -1644,7 +1644,7 @@ static void test_download_client_nested_ioloop(void)
 
 static void test_echo_client_shared(void)
 {
-       test_begin("http payload echo (server_non-blocking; client shared)");
+       test_begin("http payload download (server non-blocking; client shared)");
        blocking = FALSE;
        request_100_continue = FALSE;
        read_server_partial = 0;
@@ -1658,7 +1658,7 @@ static void test_echo_client_shared(void)
        test_run_parallel(test_client_download);
        test_end();
 
-       test_begin("http payload echo (server blocking; client shared)");
+       test_begin("http payload download (server blocking; client shared)");
        blocking = TRUE;
        request_100_continue = FALSE;
        read_server_partial = 0;
@@ -1670,6 +1670,33 @@ static void test_echo_client_shared(void)
        parallel_clients = 4;
        test_run_parallel(test_client_download);
        test_end();
+
+       test_begin("http payload echo (server non-blocking; client shared)");
+       blocking = FALSE;
+       request_100_continue = FALSE;
+       read_server_partial = 0;
+       client_ioloop_nesting = 0;
+       server_payload_handling = PAYLOAD_HANDLING_FORWARD;
+       parallel_clients = 4;
+       test_run_sequential(test_client_echo);
+       parallel_clients = 4;
+       test_run_pipeline(test_client_echo);
+       parallel_clients = 4;
+       test_run_parallel(test_client_echo);
+       test_end();
+
+       test_begin("http payload echo (server blocking; client shared)");
+       blocking = TRUE;
+       request_100_continue = FALSE;
+       read_server_partial = 0;
+       client_ioloop_nesting = 0;
+       parallel_clients = 4;
+       test_run_sequential(test_client_echo);
+       parallel_clients = 4;
+       test_run_pipeline(test_client_echo);
+       parallel_clients = 4;
+       test_run_parallel(test_client_echo);
+       test_end();
 }
 
 static void (*const test_functions[])(void) = {