uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420760926


##########
lucene/core/src/test/org/apache/lucene/store/TestMMapDirectory.java:
##########
@@ -114,4 +115,31 @@ public void testNullParamsIndexInput() throws Exception {
       }
     }
   }
+
+  private void doTestReadingClosedInput(Directory dir, long[] values, int 
numValues)

Review Comment:
   You don't need to test all variants and different sizes here. Just create an 
empty file with indexoutput. open it and close it, then call `readGroupVInts`. 
As this should only trigger the AlreadyClosedException theres no need to repeat 
this multiple times.
   These are IO-heavy tests, so only do the required stuff and don't scrub my 
SSD. It also slows down those tests.
   
   Just add it here and try to call that method on "two": 
   - 
https://github.com/apache/lucene/blob/08d24dd9cb10b0808264b7c44e5b620d7d1a398e/lucene/test-framework/src/java/org/apache/lucene/tests/store/BaseChunkedDirectoryTestCase.java#L70-L74
   - 
https://github.com/apache/lucene/blob/08d24dd9cb10b0808264b7c44e5b620d7d1a398e/lucene/test-framework/src/java/org/apache/lucene/tests/store/BaseChunkedDirectoryTestCase.java#L91-L95
   
   Anyways, I don't think we need this test in reality. Otherwise we would need 
a call of all public methods.



-- 
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