vigyasharma commented on code in PR #15428:
URL: https://github.com/apache/lucene/pull/15428#discussion_r2530084672


##########
lucene/core/src/test/org/apache/lucene/index/TestDirectoryReader.java:
##########
@@ -1121,4 +1125,125 @@ public void testOpenWithInvalidMinCompatVersion() 
throws IOException {
       DirectoryReader.open(commit, random().nextInt(Version.LATEST.major + 1), 
null).close();
     }
   }
+
+  public void testOpenWithExecutorService() throws IOException {
+    Directory dir = newDirectory();
+    createMultiSegmentIndex(dir, 5);
+
+    ExecutorService executor =
+        Executors.newFixedThreadPool(1, new 
NamedThreadFactory("TestDirectoryReader"));

Review Comment:
   Any reason to only test with 1 thread in these tests? Can we add more 
threads to test for edge cases and races, like only one thread sees an 
exception while opening a segment reader?



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