You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2017/10/07 17:09:03 UTC

[couchdb] 01/02: Fix attachments tests for 20.0 compatibility

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 4c61d10be34b74928c8b2532a07097e9a3fea52a
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Sat Oct 7 03:19:15 2017 -0400

    Fix attachments tests for 20.0 compatibility
    
    Previously gzip compression asssumed that only one final result chunk would be
    emitted during finalization. But in general, and specifically in 20.0 that's
    not true.
---
 src/couch/test/couchdb_attachments_tests.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/couch/test/couchdb_attachments_tests.erl b/src/couch/test/couchdb_attachments_tests.erl
index 4536ba6..d9efac5 100644
--- a/src/couch/test/couchdb_attachments_tests.erl
+++ b/src/couch/test/couchdb_attachments_tests.erl
@@ -758,8 +758,8 @@ create_already_compressed_att(Host, DbName) ->
 gzip(Data) ->
     Z = zlib:open(),
     ok = zlib:deflateInit(Z, ?COMPRESSION_LEVEL, deflated, 16 + 15, 8, default),
-    zlib:deflate(Z, Data),
+    Chunk = zlib:deflate(Z, Data),
     Last = zlib:deflate(Z, [], finish),
     ok = zlib:deflateEnd(Z),
     ok = zlib:close(Z),
-    Last.
+    [Chunk, Last].

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.