Tests: Correction in AbstractQueryTestCase

Removed check that two query builder that are different according
to equals() have different hashCode since that is not required
by the contract of hashCode.
This commit is contained in:
Christoph Büscher 2015-11-27 17:04:08 +01:00
parent 2f87e0a4d9
commit b375084305
1 changed files with 1 additions and 2 deletions

View File

@ -641,7 +641,6 @@ public abstract class AbstractQueryTestCase<QB extends AbstractQueryBuilder<QB>>
secondQuery.boost(firstQuery.boost() + 1f + randomFloat());
}
assertThat("different queries should not be equal", secondQuery, not(equalTo(firstQuery)));
assertThat("different queries should have different hashcode", secondQuery.hashCode(), not(equalTo(firstQuery.hashCode())));
}
}
@ -897,7 +896,7 @@ public abstract class AbstractQueryTestCase<QB extends AbstractQueryBuilder<QB>>
msg(expected, builder.string()),
expected.replaceAll("\\s+",""),
builder.string().replaceAll("\\s+",""));
}
}
private static String msg(String left, String right) {
int size = Math.min(left.length(), right.length());