vsop-479 commented on code in PR #17014:
URL: https://github.com/apache/lucene/pull/17014#discussion_r4608554446


##########
lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.java:
##########
@@ -344,7 +344,10 @@ public void testCorruptSegmentInfoNamesTheSegment() throws 
Exception {
         } else {
           assertTrue(corruption + ": " + cause, cause instanceof IOException);
         }
-        assertTrue(corruption + ": " + cause, 
cause.toString().contains("_1.si"));
+
+        // NOTE: We can assert that the cause's message contains the filename 
once all relevant
+        // exception paths, including EOFException, provide it. For example: 
assertTrue(corruption +
+        // ": " + cause, cause.toString().contains("_1.si"));

Review Comment:
   That makes sense. Addressed, thanks @jainankitk !



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to