Author: rhuijben
Date: Tue Nov 24 08:02:43 2015
New Revision: 1716052

URL: http://svn.apache.org/viewvc?rev=1716052&view=rev
Log:
On the pump investigate branch: reduce tests even further.

Modified:
    serf/branches/pump-investigate/test/test_all.c
    serf/branches/pump-investigate/test/test_server.c

Modified: serf/branches/pump-investigate/test/test_all.c
URL: 
http://svn.apache.org/viewvc/serf/branches/pump-investigate/test/test_all.c?rev=1716052&r1=1716051&r2=1716052&view=diff
==============================================================================
--- serf/branches/pump-investigate/test/test_all.c (original)
+++ serf/branches/pump-investigate/test/test_all.c Tue Nov 24 08:02:43 2015
@@ -29,11 +29,11 @@ static const struct testlist {
     const char *testname;
     CuSuite *(*func)(void);
 } tests[] = {
-    {"context",     test_context},
+/*    {"context",     test_context},
     {"buckets",     test_buckets},
     {"ssl",         test_ssl},
     {"auth",        test_auth},
-    {"internal",    test_internal},
+    {"internal",    test_internal},*/
     {"server",      test_server},
 #if 0
     /* internal test for the mock bucket. */

Modified: serf/branches/pump-investigate/test/test_server.c
URL: 
http://svn.apache.org/viewvc/serf/branches/pump-investigate/test/test_server.c?rev=1716052&r1=1716051&r2=1716052&view=diff
==============================================================================
--- serf/branches/pump-investigate/test/test_server.c (original)
+++ serf/branches/pump-investigate/test/test_server.c Tue Nov 24 08:02:43 2015
@@ -36,6 +36,7 @@ static apr_status_t client_setup(apr_soc
                                  apr_pool_t *pool)
 {
     test_baton_t *tb = setup_baton;
+    fprintf(stderr, "In client setup\n");
 
     *read_bkt = serf_bucket_socket_create(skt, tb->bkt_alloc);
     return APR_SUCCESS;
@@ -46,6 +47,7 @@ static apr_status_t client_closed(serf_i
                                   apr_status_t why,
                                   apr_pool_t *pool)
 {
+    fprintf(stderr, "In client closed\n");
     return APR_ENOTIMPL;
 }
 
@@ -58,6 +60,8 @@ static apr_status_t client_request_handl
     apr_size_t len;
     apr_status_t status;
 
+    fprintf(stderr, "In request handler\n");
+
     do
     {
         status = serf_bucket_read(request, SERF_READ_ALL_AVAIL, &data, &len);
@@ -75,6 +79,8 @@ static apr_status_t client_generate_resp
     serf_bucket_t *tmp;
 #define CRLF "\r\n"
 
+    fprintf(stderr, "In create response\n");
+
     tmp = SERF_BUCKET_SIMPLE_STRING("HTTP/1.1 200 OK" CRLF
                                     "Content-Length: 4" CRLF
                                     CRLF
@@ -96,6 +102,9 @@ static apr_status_t client_request_accep
                                             apr_pool_t *pool)
 {
     test_baton_t *tb = request_baton;
+
+    fprintf(stderr, "In request acceptor\n");
+
     *req_bkt = serf_bucket_incoming_request_create(stream, stream->allocator);
 
     *handler = client_request_handler;
@@ -116,6 +125,8 @@ static apr_status_t client_acceptor(serf
     serf_incoming_t *incoming;
     test_baton_t *tb = accept_baton;
 
+    fprintf(stderr, "In client acceptor\n");
+
     return serf_incoming_create2(&incoming, ctx, insock,
                                  client_setup, tb,
                                  client_closed, tb,
@@ -129,9 +140,13 @@ void setup_test_server(test_baton_t *tb)
     apr_status_t status;
     apr_port_t listen_port = 47080;
 
+    fprintf(stderr, "In setup server\n");
+
     if (!tb->mh)    /* TODO: move this to test_setup */
         tb->mh = mhInit();
 
+    fprintf(stderr, "In setup server (2)\n");
+
     tb->context = serf_context_create(tb->pool);
 
     while ((status = serf_listener_create(&listener, tb->context,
@@ -146,6 +161,8 @@ void setup_test_server(test_baton_t *tb)
     tb->serv_host = apr_psprintf(tb->pool, "%s:%d", "localhost",
                                  tb->serv_port);
     tb->serv_url = apr_psprintf(tb->pool, "http://%s";, tb->serv_host);
+
+    fprintf(stderr, "In setup server (3)\n");
 }
 
 static apr_status_t
@@ -161,6 +178,8 @@ run_client_server_loop(test_baton_t *tb,
 
     apr_pool_create(&iter_pool, pool);
 
+    fprintf(stderr, "Starting loop\n");
+
     while (!done)
     {
         apr_pool_clear(iter_pool);
@@ -180,6 +199,8 @@ run_client_server_loop(test_baton_t *tb,
     }
     apr_pool_destroy(iter_pool);
 
+    fprintf(stderr, "Loop done\n");
+
     return APR_SUCCESS;
 }
 


Reply via email to