Github user gerlowskija commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/464#discussion_r227024256
--- Diff: solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
---
@@ -1214,29 +1208,23 @@ public void testPayloadScoreQuery() throws
Exception {
// I don't see a precedent to test query inequality in here, so doing
a `try`
// There was a bug with PayloadScoreQuery's .equals() method that said
two queries were equal with different includeSpanScore settings
- try {
- assertQueryEquals
- ("payload_score"
- , "{!payload_score f=foo_dpf v=query func=min
includeSpanScore=false}"
- , "{!payload_score f=foo_dpf v=query func=min
includeSpanScore=true}"
- );
- fail("queries should not have been equal");
- } catch(AssertionFailedError e) {
- assertTrue("queries were not equal, as expected", true);
- }
+ expectThrows(AssertionFailedError.class, "queries were not equal, as
expected",
--- End diff --
[-1] I think this exception message here is backwards. This assertion
fails if the queries _were_ equal, but the message implies that the problem is
that they were !=. Using the message from the original `fail()` invocation
would probably work better here ("queries should not have been equal")
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]