Skip to content

Commit

Permalink
Merge pull request #17238 from ghalliday/issue29369
Browse files Browse the repository at this point in the history
HPCC-29369 Avoid including 'randrow' compression in unittests

Reviewed-By: Attila Vamos <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Apr 17, 2023
2 parents 3aa3c72 + 42cf2a9 commit c4b2df9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 7 additions & 4 deletions system/jlib/jlzw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1651,7 +1651,7 @@ class jlib_decl CRandRDiffCompressor : public ICompressor, public CInterface
void close()
{
header->rowofs[0] = (unsigned short)diffbuf.length();
ASSERT((size32_t)(header->totsize+header->firstrlesize)<=max);
ASSERT((size32_t)(header->totsize+header->firstrlesize)<=max || max == 0);
unsigned short hofs = header->hsize();
ASSERT(header->totsize==hofs+diffbuf.length());
if (outBufMb)
Expand All @@ -1661,9 +1661,12 @@ class jlib_decl CRandRDiffCompressor : public ICompressor, public CInterface
outBufMb = NULL;
}
byte *out = (byte *)outbuf+hofs;
memcpy(out,diffbuf.toByteArray(),diffbuf.length());
out += diffbuf.length();
diffbuf.clear();
if (diffbuf.length())
{
memcpy(out,diffbuf.toByteArray(),diffbuf.length());
out += diffbuf.length();
diffbuf.clear();
}
memcpy(out,firstrle.bufferBase(),header->firstrlesize);
header->totsize += header->firstrlesize;
firstrle.clear();
Expand Down
3 changes: 3 additions & 0 deletions testing/unittests/jlibtests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2686,6 +2686,9 @@ class JlibCompressionTestsStress : public CppUnit::TestFixture
{
compressed.clear();
ICompressHandler &handler = iter->query();
//Ignore unusual compressors with no expanders...
if (strieq(handler.queryType(), "randrow"))
continue;
Owned<ICompressor> compressor = handler.getCompressor(streq("AES", handler.queryType()) ? aesKey: nullptr);

CCycleTimer timer;
Expand Down

0 comments on commit c4b2df9

Please sign in to comment.