You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2016/08/16 17:40:20 UTC

[jira] [Commented] (LUCENE-7414) TestUtil.checkIterator can make tests very slow.

    [ https://issues.apache.org/jira/browse/LUCENE-7414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15423132#comment-15423132 ] 

Michael McCandless commented on LUCENE-7414:
--------------------------------------------

+1, wow :)

> TestUtil.checkIterator can make tests very slow.
> ------------------------------------------------
>
>                 Key: LUCENE-7414
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7414
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-7414.patch
>
>
> This is used e.g. in assertingcodec and does various checks that an iterator is well-behaved, but checking for the UOE on each element makes indexing in tests too costly.
> It is enough to just check for the first element?
> Here is an example seed i hit on accident. It indexes quite a few docs (should probably, separately be marked a slow or nightly test), and consistently takes ~ 320 seconds on master.
> {noformat}
> ant test -Dtestcase=TestBoolean2 -Dtests.slow=true -Dtests.seed=DEE69D15C462C3A8
>    [junit4] Started J0 PID(14619@localhost).
>    [junit4] Suite: org.apache.lucene.search.TestBoolean2
>    [junit4] HEARTBEAT J0 PID(14619@localhost): 2016-08-16T12:20:42, stalled for 71.5s at: TestBoolean2 (suite)
>    [junit4] HEARTBEAT J0 PID(14619@localhost): 2016-08-16T12:21:42, stalled for  131s at: TestBoolean2 (suite)
>    [junit4] HEARTBEAT J0 PID(14619@localhost): 2016-08-16T12:22:42, stalled for  191s at: TestBoolean2 (suite)
>    [junit4] HEARTBEAT J0 PID(14619@localhost): 2016-08-16T12:23:42, stalled for  251s at: TestBoolean2 (suite)
>    [junit4] OK      0.05s | TestBoolean2.testQueries04
>    [junit4] OK      0.01s | TestBoolean2.testQueries05
>    [junit4] OK      0.02s | TestBoolean2.testQueries02
>    [junit4] OK      0.03s | TestBoolean2.testQueries03
>    [junit4] OK      0.02s | TestBoolean2.testQueries06
>    [junit4] OK      0.00s | TestBoolean2.testQueries07
>    [junit4] OK      4.97s | TestBoolean2.testRandomQueries
>    [junit4] OK      0.02s | TestBoolean2.testQueries08
>    [junit4] OK      0.01s | TestBoolean2.testQueries01
>    [junit4] OK      0.01s | TestBoolean2.testQueries09
>    [junit4] Completed [1/1] in 317.06s, 10 tests
> {noformat}
> With this simple fix, it takes 24s, more than 10x faster. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org