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 55dd4f6b Fix broken tests.
55dd4f6b is described below
commit 55dd4f6b2cabd5073b5269f4458c8cf75e030489
Author: Gary Gregory <[email protected]>
AuthorDate: Thu May 5 15:28:13 2022 -0400
Fix broken tests.
---
.../compress/compressors/bzip2/PythonTruncatedBzip2Test.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/src/test/java/org/apache/commons/compress/compressors/bzip2/PythonTruncatedBzip2Test.java
b/src/test/java/org/apache/commons/compress/compressors/bzip2/PythonTruncatedBzip2Test.java
index 54934302..f6f80963 100644
---
a/src/test/java/org/apache/commons/compress/compressors/bzip2/PythonTruncatedBzip2Test.java
+++
b/src/test/java/org/apache/commons/compress/compressors/bzip2/PythonTruncatedBzip2Test.java
@@ -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 class PythonTruncatedBzip2Test {
@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