Skip to content
Permalink
Browse files
Fix broken tests.
  • Loading branch information
garydgregory committed May 5, 2022
1 parent 6ba2c5f commit 55dd4f6b2cabd5073b5269f4458c8cf75e030489
Showing 1 changed file with 4 additions and 3 deletions.
@@ -19,6 +19,7 @@
package org.apache.commons.compress.compressors.bzip2;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
@@ -72,11 +73,11 @@ public void closeChannel() throws IOException {

@Test
public void testTruncatedData() throws IOException {
//with BZ2File(self.filename) as f:
// self.assertRaises(EOFError, f.read)
// with BZ2File(self.filename) as f:
// self.assertRaises(EOFError, f.read)
System.out.println("Attempt to read the whole thing in, should throw ...");
final ByteBuffer buffer = ByteBuffer.allocate(8192);
bz2Channel.read(buffer);
assertThrows(IOException.class, () -> bz2Channel.read(buffer));
}

@Test

0 comments on commit 55dd4f6

Please sign in to comment.