HADOOP-10843. TestGridmixRecord unit tests failure on PowerPC (Jinghui Wang via Colin Patrick McCabe)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1617860 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Colin McCabe 2014-08-14 01:36:12 +00:00
parent 1a535f8dcd
commit e90d940699
2 changed files with 8 additions and 5 deletions

View File

@ -578,6 +578,9 @@ Release 2.6.0 - UNRELEASED
HADOOP-10966. Hadoop Common native compilation broken in windows.
(David Villegas via Arpit Agarwal)
HADOOP-10843. TestGridmixRecord unit tests failure on PowerPC (Jinghui Wang
via Colin Patrick McCabe)
Release 2.5.0 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -140,10 +140,10 @@ static void binSortTest(GridmixRecord x, GridmixRecord y, int min,
final int chk = WritableComparator.compareBytes(
out1.getData(), 0, out1.getLength(),
out2.getData(), 0, out2.getLength());
assertEquals(chk, x.compareTo(y));
assertEquals(chk, cmp.compare(
assertEquals(Integer.signum(chk), Integer.signum(x.compareTo(y)));
assertEquals(Integer.signum(chk), Integer.signum(cmp.compare(
out1.getData(), 0, out1.getLength(),
out2.getData(), 0, out2.getLength()));
out2.getData(), 0, out2.getLength())));
// write second copy, compare eq
final int s1 = out1.getLength();
x.write(out1);
@ -153,8 +153,8 @@ static void binSortTest(GridmixRecord x, GridmixRecord y, int min,
y.write(out2);
assertEquals(0, cmp.compare(out2.getData(), 0, s2,
out2.getData(), s2, out2.getLength() - s2));
assertEquals(chk, cmp.compare(out1.getData(), 0, s1,
out2.getData(), s2, out2.getLength() - s2));
assertEquals(Integer.signum(chk), Integer.signum(cmp.compare(out1.getData(), 0, s1,
out2.getData(), s2, out2.getLength() - s2)));
}
}