javanna commented on code in PR #13542: URL: https://github.com/apache/lucene/pull/13542#discussion_r1665818254
########## lucene/core/src/test/org/apache/lucene/index/TestSegmentToThreadMapping.java: ########## @@ -160,83 +155,133 @@ public CacheHelper getReaderCacheHelper() { }; } - public void testSingleSlice() { - LeafReader largeSegmentReader = dummyIndexReader(50_000); - LeafReader firstMediumSegmentReader = dummyIndexReader(30_000); - LeafReader secondMediumSegmentReader = dummyIndexReader(30__000); - LeafReader thirdMediumSegmentReader = dummyIndexReader(30_000); + private static List<LeafReaderContext> createLeafReaderContexts(int... maxDocs) { List<LeafReaderContext> leafReaderContexts = new ArrayList<>(); + for (int maxDoc : maxDocs) { + leafReaderContexts.add(new LeafReaderContext(dummyIndexReader(maxDoc))); + } + Collections.shuffle(leafReaderContexts, random()); + return leafReaderContexts; + } - leafReaderContexts.add(new LeafReaderContext(largeSegmentReader)); - leafReaderContexts.add(new LeafReaderContext(firstMediumSegmentReader)); - leafReaderContexts.add(new LeafReaderContext(secondMediumSegmentReader)); - leafReaderContexts.add(new LeafReaderContext(thirdMediumSegmentReader)); - - IndexSearcher.LeafSlice[] resultSlices = IndexSearcher.slices(leafReaderContexts, 250_000, 5); - - assertTrue(resultSlices.length == 1); - - final LeafReaderContext[] leaves = resultSlices[0].leaves; + @AwaitsFix(bugUrl = "restore!") Review Comment: these tests are disabled only due to the hack that forces slices with a single document to increase test coverage. Otherwise they are fine and up-to-date. -- 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