summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Vatamaniuc <vatamane@apache.org>2017-10-07 03:19:15 -0400
committerJoan Touzet <wohali@users.noreply.github.com>2017-10-19 19:13:25 -0400
commit3c7258cf714e2ac8296ef6acce7d27727212fb9c (patch)
tree43b551006c169d15bcacf316889d8faf17de9608
parent061938fa282200abbf0a1d731a7fb82f763c9c50 (diff)
downloadcouchdb-3c7258cf714e2ac8296ef6acce7d27727212fb9c.tar.gz
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.
-rw-r--r--src/couch/test/couchdb_attachments_tests.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couch/test/couchdb_attachments_tests.erl b/src/couch/test/couchdb_attachments_tests.erl
index 4536ba6b2..d9efac551 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].