This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-compress.git
The following commit(s) were added to refs/heads/master by this push: new 816e4da6c Javadoc 816e4da6c is described below commit 816e4da6c4bc1168fe2c5463d1857e864db8019f Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu May 16 07:32:08 2024 -0400 Javadoc --- .../compress/compressors/pack200/Pack200UtilsTest.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/test/java/org/apache/commons/compress/compressors/pack200/Pack200UtilsTest.java b/src/test/java/org/apache/commons/compress/compressors/pack200/Pack200UtilsTest.java index 3a4f50e18..2f07fb362 100644 --- a/src/test/java/org/apache/commons/compress/compressors/pack200/Pack200UtilsTest.java +++ b/src/test/java/org/apache/commons/compress/compressors/pack200/Pack200UtilsTest.java @@ -52,25 +52,25 @@ public final class Pack200UtilsTest extends AbstractTest { } } + /** + * Tests https://issues.apache.org/jira/browse/COMPRESS-675 + * + * Put 2 pack files inside an archive and then try to unpack them. + */ @Disabled("WIP: https://issues.apache.org/jira/browse/COMPRESS-675") @Test public void testCompress675() throws Exception { - // COMPRESS-675 // put 2 pack files inside an archive and then try to unpack them. - final File pack = getFile("bla.pack"); final File archiveFile = createTempFile(); - final long expectedBytes; try (UnsynchronizedByteArrayOutputStream bos = UnsynchronizedByteArrayOutputStream.builder().get(); Pack200CompressorInputStream inputStream = new Pack200CompressorInputStream(new FileInputStream(pack))) { IOUtils.copy(inputStream, bos); expectedBytes = bos.size() * 2; } - try (OutputStream os = new FileOutputStream(archiveFile); TarArchiveOutputStream taos = new TarArchiveOutputStream(os)) { - final TarArchiveEntry ae = taos.createArchiveEntry(pack, "./bla.pack"); taos.putArchiveEntry(ae); try (FileInputStream in = new FileInputStream(pack)) { @@ -86,10 +86,9 @@ public final class Pack200UtilsTest extends AbstractTest { taos.finish(); taos.flush(); } - // The underlying ChannelInputStream is what causes the problem // FileInputStream doesn't show the bug - + // // If you use a zip archive instead of a tar archive you // get a different number of bytes read, but still not the expected try (InputStream is = new FileInputStream(archiveFile);