rmuir commented on code in PR #14518:
URL: https://github.com/apache/lucene/pull/14518#discussion_r2050669053


##########
lucene/core/src/test/org/apache/lucene/document/TestDocument.java:
##########
@@ -233,7 +245,7 @@ public void testPositionIncrementMultiFields() throws 
Exception {
     PhraseQuery query = new PhraseQuery("indexed_not_tokenized", "test1", 
"test2");
 
     ScoreDoc[] hits = searcher.search(query, 1000).scoreDocs;
-    assertEquals(1, hits.length);
+    assertThat(hits, arrayWithSize(1));

Review Comment:
   I guess I'm confused what could be better about the existing error message, 
it asserts that array's length is 1, and if its something else, you'll see that 
number. 
   
   So... zero benefit, but at the cost of making the code significantly more 
difficult to read (which is actually very important when trying to debug the 
tests)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to