atris commented on issue #769: LUCENE-8905: Better Error Handling For Illegal Arguments URL: https://github.com/apache/lucene-solr/pull/769#issuecomment-515429984 > I ran top-level `ant test` and hit this exception on the PR as of yesterday: > > ``` > [junit4] Suite: org.apache.lucene.search.grouping.TestGrouping > [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestGrouping -Dtests.method=testRandom -Dtests.seed=F08BE82DC9B3756C -Dtests.badapples=true -Dtests.locale=es-BZ -Dtests.timezone\ > =Africa/Gaborone -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1 > [junit4] ERROR 1.65s J0 | TestGrouping.testRandom <<< > [junit4] > Throwable #1: java.lang.IllegalArgumentException: Expected value of starting position is between 0 and 3, got 7 > [junit4] > at __randomizedtesting.SeedInfo.seed([F08BE82DC9B3756C:82C7CD2278D3C31F]:0) > [junit4] > at org.apache.lucene.search.TopDocsCollector.topDocs(TopDocsCollector.java:141) > [junit4] > at org.apache.lucene.search.grouping.TopGroupsCollector.getTopGroups(TopGroupsCollector.java:163) > [junit4] > at org.apache.lucene.search.grouping.TestGrouping.getTopGroups(TestGrouping.java:319) > [junit4] > at org.apache.lucene.search.grouping.TestGrouping.testRandom(TestGrouping.java:965) > [junit4] > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > [junit4] > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > [junit4] > at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > [junit4] > at java.base/java.lang.reflect.Method.invoke(Method.java:566) > [junit4] > at java.base/java.lang.Thread.run(Thread.java:834) > [junit4] 2> NOTE: test params are: codec=Asserting(Lucene80): {groupend=TestBloomFilteredLucenePostings(BloomFilteringPostingsFormat(Lucene50(blocksize=128))), sort1=FST50, sort2=TestB\ > loomFilteredLucenePostings(BloomFilteringPostingsFormat(Lucene50(blocksize=128))), content=PostingsFormat(name=Direct), group=FST50}, docValues:{author=DocValuesFormat(name=Asserting), sort\ > 1=DocValuesFormat(name=Lucene80), id=DocValuesFormat(name=Lucene80), sort2=DocValuesFormat(name=Direct), ___soft_deletes=DocValuesFormat(name=Lucene80), group=DocValuesFormat(name=Lucene80)\ > }, maxPointsInLeafNode=2036, maxMBSortInHeap=7.045070063116054, sim=Asserting(org.apache.lucene.search.similarities.AssertingSimilarity@19474185), locale=es-BZ, timezone=Africa/Gaborone > [junit4] 2> NOTE: Linux 4.4.0-96-generic amd64/Oracle Corporation 11.0.2 (64-bit)/cpus=8,threads=1,free=510432528,total=536870912 > [junit4] 2> NOTE: All tests run in this JVM: [TestGrouping] > ``` Interesting, I cannot see this for previous versions of Lucene, but rebasing got me this error. I added the check Adrien suggested and got the following failure: java.lang.IllegalArgumentException: Requested number of hits greater than original hits limit for the collector. size 4 start 2 howMany 49 I think why that is happening is because today, we fix howMany to be within valid limits in case it is larger than the available number of hits, rather than erroring out.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org