serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1700530 - in /serf/branches/1.3.x: ./ test/test_buckets.c
Date Tue, 01 Sep 2015 12:43:14 GMT
Author: rhuijben
Date: Tue Sep  1 12:43:13 2015
New Revision: 1700530

URL: http://svn.apache.org/r1700530
Log:
On the 1.3.x branch: Merge r1699975 from trunk.

This introduction of an iterpool fixes the 1.3.x tests on Windows.

Modified:
    serf/branches/1.3.x/   (props changed)
    serf/branches/1.3.x/test/test_buckets.c

Propchange: serf/branches/1.3.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep  1 12:43:13 2015
@@ -1,4 +1,4 @@
 /serf/branches/1.3.x:1699925,1699931
 /serf/branches/multiple_ssl_impls:1699382
 /serf/branches/windows-sspi:1698866-1698877
-/serf/trunk:1699516-1699518,1699520-1699522,1699528,1699530-1699535,1699537,1699539-1699541,1699543,1699548-1699549,1699553,1699555-1699556,1699559-1699560,1699563-1699565,1699567-1699570,1699572-1699573,1699578-1699580,1699582-1699597,1699599-1699602,1699607,1699610,1699615-1699618,1699622-1699623,1699626-1699627,1699633,1699637,1699642,1699645,1699647,1699649-1699650,1699652,1699654-1699655,1699659-1699665,1699671,1699674,1699680-1699683,1699687-1699688,1699690,1699692-1699694,1699698-1699700,1699702,1699707-1699708,1699712-1699716,1699720,1699724,1699728,1699730,1699733,1699762,1699770,1699773,1699777,1699780-1699781,1699798,1699800-1699801,1699817,1699819,1699838,1699843,1699846,1699850,1699873,1699881,1699884,1699902-1699903,1699906,1699924,1699926-1699927,1699930,1699932,1699936-1699937,1699941,1699948-1699950,1699954,1699957,1699964,1699973,1700234,1700236
+/serf/trunk:1699516-1699518,1699520-1699522,1699528,1699530-1699535,1699537,1699539-1699541,1699543,1699548-1699549,1699553,1699555-1699556,1699559-1699560,1699563-1699565,1699567-1699570,1699572-1699573,1699578-1699580,1699582-1699597,1699599-1699602,1699607,1699610,1699615-1699618,1699622-1699623,1699626-1699627,1699633,1699637,1699642,1699645,1699647,1699649-1699650,1699652,1699654-1699655,1699659-1699665,1699671,1699674,1699680-1699683,1699687-1699688,1699690,1699692-1699694,1699698-1699700,1699702,1699707-1699708,1699712-1699716,1699720,1699724,1699728,1699730,1699733,1699762,1699770,1699773,1699777,1699780-1699781,1699798,1699800-1699801,1699817,1699819,1699838,1699843,1699846,1699850,1699873,1699881,1699884,1699902-1699903,1699906,1699924,1699926-1699927,1699930,1699932,1699936-1699937,1699941,1699948-1699950,1699954,1699957,1699964,1699973,1699975,1700234,1700236

Modified: serf/branches/1.3.x/test/test_buckets.c
URL: http://svn.apache.org/viewvc/serf/branches/1.3.x/test/test_buckets.c?rev=1700530&r1=1700529&r2=1700530&view=diff
==============================================================================
--- serf/branches/1.3.x/test/test_buckets.c (original)
+++ serf/branches/1.3.x/test/test_buckets.c Tue Sep  1 12:43:13 2015
@@ -1309,12 +1309,12 @@ static void read_bucket_and_check_patter
                           expected_len);
 }
 
-static void deflate_buckets(CuTest *tc, int nr_of_loops)
+static void deflate_buckets(CuTest *tc, int nr_of_loops, apr_pool_t *pool)
 {
     const char *msg = "12345678901234567890123456789012345678901234567890";
 
     test_baton_t *tb = tc->testBaton;
-    serf_bucket_alloc_t *alloc = serf_bucket_allocator_create(tb->pool, NULL,
+    serf_bucket_alloc_t *alloc = serf_bucket_allocator_create(pool, NULL,
                                                               NULL);
     z_stream zdestr;
     int i;
@@ -1333,8 +1333,8 @@ static void deflate_buckets(CuTest *tc,
     {
         serf_config_t *config;
 
-        serf_context_t *ctx = serf_context_create(tb->pool);
-        /* status = */ serf__config_store_get_config(ctx, NULL, &config, tb->pool);
+        serf_context_t *ctx = serf_context_create(pool);
+        /* status = */ serf__config_store_get_config(ctx, NULL, &config, pool);
 
         serf_bucket_set_config(defbkt, config);
     }
@@ -1356,11 +1356,11 @@ static void deflate_buckets(CuTest *tc,
         if (i == nr_of_loops - 1) {
             CuAssertIntEquals(tc, APR_SUCCESS,
                               deflate_compress(&data, &len, &zdestr, msg,
-                                               strlen(msg), 1, tb->pool));
+                                               strlen(msg), 1, pool));
         } else {
             CuAssertIntEquals(tc, APR_SUCCESS,
                               deflate_compress(&data, &len, &zdestr, msg,
-                                               strlen(msg), 0, tb->pool));
+                                               strlen(msg), 0, pool));
         }
 
         if (len == 0)
@@ -1378,10 +1378,15 @@ static void deflate_buckets(CuTest *tc,
 static void test_deflate_buckets(CuTest *tc)
 {
     int i;
+    apr_pool_t *iterpool;
+    test_baton_t *tb = tc->testBaton;
 
+    apr_pool_create(&iterpool, tb->pool);
     for (i = 1; i < 1000; i++) {
-        deflate_buckets(tc, i);
+        apr_pool_clear(iterpool);
+        deflate_buckets(tc, i, iterpool);
     }
+    apr_pool_destroy(iterpool);
 }
 
 static apr_status_t discard_data(serf_bucket_t *bkt,



Mime
View raw message