From 1fc36b824cef92a76f7d08c6cc8dc3acad56b39e Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Sat, 9 Jan 2016 11:10:20 +0000 Subject: [PATCH] HADOOP-12590. TestCompressorDecompressor failing without stack traces (John Zhuge via stevel) (cherry picked from commit 80734bc346e8d339a2427b4f691365298acf062c) --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../hadoop/io/compress/TestCompressorDecompressor.java | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index cd6576c2475..b8201cfb687 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -970,6 +970,9 @@ Release 2.7.3 - UNRELEASED HADOOP-12706. TestLocalFsFCStatistics#testStatisticsThreadLocalDataCleanUp times out occasionally (Sangjin Lee and Colin Patrick McCabe via jlowe) + HADOOP-12590. TestCompressorDecompressor failing without stack traces + (John Zhuge via stevel) + Release 2.7.2 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/compress/TestCompressorDecompressor.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/compress/TestCompressorDecompressor.java index a8ac993c47b..49a41fb8ba8 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/compress/TestCompressorDecompressor.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/compress/TestCompressorDecompressor.java @@ -26,6 +26,7 @@ import org.apache.hadoop.io.compress.snappy.SnappyCompressor; import org.apache.hadoop.io.compress.snappy.SnappyDecompressor; import org.apache.hadoop.io.compress.zlib.BuiltInZlibDeflater; import org.apache.hadoop.io.compress.zlib.BuiltInZlibInflater; +import org.apache.hadoop.test.GenericTestUtils; import org.junit.Test; import com.google.common.collect.ImmutableSet; @@ -66,7 +67,8 @@ public class TestCompressorDecompressor { .test(); } catch (Exception ex) { - fail("testCompressorDecompressor error !!!" + ex); + GenericTestUtils.assertExceptionContains( + "testCompressorDecompressor error !!!", ex); } } @@ -88,7 +90,8 @@ public class TestCompressorDecompressor { .test(); } catch (Exception ex) { - fail("testCompressorDecompressorWithExeedBufferLimit error !!!" + ex); + GenericTestUtils.assertExceptionContains( + "testCompressorDecompressorWithExeedBufferLimit error !!!", ex); } }