[
https://issues.apache.org/jira/browse/SOLR-17372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17866876#comment-17866876
]
Jan Høydahl commented on SOLR-17372:
------------------------------------
Not yet sure why this happens with the given test seed, but the assert on this
line
https://github.com/apache/solr/blob/main/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java#L2292
is much more likely to fail with the seed. It tolerates a variance of 1.0f,
but sometimes it is as large as 2.5 off for the larger numbers, e.g. the "40.0"
test sometimes returns stat of "37.3". So a way to fix the test could be to
allow 10% variance instead of a fixed 1.0, but maybe even better try to figure
out what exactly is randomized to produce the larger diff with this particular
seed. Is it using some different algorithm, lower precision or something?
> Reproducing failure in StatsComponentTest.testPercentiles
> ---------------------------------------------------------
>
> Key: SOLR-17372
> URL: https://issues.apache.org/jira/browse/SOLR-17372
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Tests
> Reporter: Jan Høydahl
> Priority: Major
>
> Found a reproducing seed for StatsComponentTest:
> {code:java}
> ./gradlew :solr:core:test --tests
> "org.apache.solr.handler.component.StatsComponentTest.testPercentiles"
> -Ptests.seed=2074D8EC40F42163
> {code}
> Test failure output:
> {code}
> 2> 3284 INFO
> (TEST-StatsComponentTest.testPercentiles-seed#[2074D8EC40F42163]) [n: c: s:
> r: x:collection1 t:] o.a.s.c.S.Request webapp=null path=null
> params={q=*:*&stats=true&wt=xml&stats.field={!percentiles%3D'10.0,99.9,1.0,2.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,98.0,99.0'}stat_f}
> hits=500 status=0 QTime=5
> 2> 3285 INFO
> (TEST-StatsComponentTest.testPercentiles-seed#[2074D8EC40F42163]) [n: c: s:
> r: x: t:] o.a.s.SolrTestCaseJ4 ###Ending testPercentiles
> > java.lang.AssertionError: expected:<60.0> but was:<58.29201902748414>
> > at
> __randomizedtesting.SeedInfo.seed([2074D8EC40F42163:14B378D80690A857]:0)
> > at org.junit.Assert.fail(Assert.java:89)
> > at org.junit.Assert.failNotEquals(Assert.java:835)
> > at org.junit.Assert.assertEquals(Assert.java:555)
> > at org.junit.Assert.assertEquals(Assert.java:685)
> > at
> org.apache.solr.handler.component.StatsComponentTest.testPercentiles(StatsComponentTest.java:2292)
> {code}
> Similar seeds can easily be found in the builds list, looks like a rounding
> issue in the test.
> https://lists.apache.org/[email protected]:lte=1y:&header_body=org.apache.solr.handler.component.StatsComponentTest.testPercentiles
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]