shubhamvishu commented on code in PR #11954: URL: https://github.com/apache/lucene/pull/11954#discussion_r1029256452
########## lucene/core/src/test/org/apache/lucene/index/TestExitableDirectoryReader.java: ########## @@ -292,7 +296,11 @@ public void testExitablePointValuesIndexReader() throws Exception { // Not checking the validity of the result, all we are bothered about in this test is the timing // out. directoryReader = DirectoryReader.open(directory); - exitableDirectoryReader = new ExitableDirectoryReader(directoryReader, disabledQueryTimeout()); + exitableDirectoryReader = directoryReader; + if (disabledQueryTimeout() != null) { Review Comment: Yes, we are not using the `ExitableDirectoryReader` so lets completely remove this code for testing disabled timeout. ########## lucene/core/src/java/org/apache/lucene/index/ExitableDirectoryReader.java: ########## @@ -784,7 +770,10 @@ protected DirectoryReader doWrapDirectoryReader(DirectoryReader in) throws IOExc */ public static DirectoryReader wrap(DirectoryReader in, QueryTimeout queryTimeout) throws IOException { - return new ExitableDirectoryReader(in, queryTimeout); + if (queryTimeout != null) { Review Comment: Sure, so lets throw an `ExitingReaderException` if queryTimeout is null? -- 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