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
This commit is contained in:
parent
889528e387
commit
dec4c1614e
@ -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
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user