From dec4c1614ee38c182bfe08c41138e1473ed1965a Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 6 Jan 2010 22:03:33 +0000 Subject: [PATCH] HADOOP-6479. TestUTF8 assertions could fail with better text. Contributed by Steve Loughran. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@896691 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 +++ src/test/core/org/apache/hadoop/io/TestUTF8.java | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 91113cc40e..834506aae5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -91,6 +91,9 @@ Trunk (unreleased changes) HADOOP-3205. Read multiple chunks directly from FSInputChecker subclass into user buffers. (Todd Lipcon via tomwhite) + HADOOP-6479. TestUTF8 assertions could fail with better text. + (Steve Loughran via tomwhite) + OPTIMIZATIONS BUG FIXES diff --git a/src/test/core/org/apache/hadoop/io/TestUTF8.java b/src/test/core/org/apache/hadoop/io/TestUTF8.java index 01c5a56634..115fbe96c4 100644 --- a/src/test/core/org/apache/hadoop/io/TestUTF8.java +++ b/src/test/core/org/apache/hadoop/io/TestUTF8.java @@ -68,16 +68,16 @@ public void testIO() throws Exception { // test that it reads correctly in.reset(out.getData(), out.getLength()); String after = UTF8.readString(in); - assertTrue(before.equals(after)); + assertEquals(before, after); // test that it reads correctly with DataInput in.reset(out.getData(), out.getLength()); String after2 = in.readUTF(); - assertTrue(before.equals(after2)); + assertEquals(before, after2); // test that it is compatible with Java's other decoder String after3 = new String(out.getData(), 2, out.getLength()-2, "UTF-8"); - assertTrue(before.equals(after3)); + assertEquals(before, after3); }