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

Robert Muir commented on LUCENE-3269:
-------------------------------------

Hi Shai: a couple suggestions.

With the current patch we will never close these directories, so we lose some 
test coverage like the CheckIndex at the end...
I think these tests caught a serious JRE bug in this checkindex so i'd like to 
keep it.

Additionally we have a problem I think if we randomly get a FSDirectory, 
especially on windows.

So how about we build up a RAMdir and cache it? when topK tests start up they 
could do something like this:

{noformat}
   Directory dir = newDirectory(random, getCachedDir());
   ...
   dir.close();
{noformat}

where getCachedDir is the access to the cache (if it doesnt exist, it builds 
it, and its always a ramdir).
(LuceneTestCase already has newDirectory(random, Directory) that copies from an 
existing directory)

                
> Speed up Top-K sampling tests
> -----------------------------
>
>                 Key: LUCENE-3269
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3269
>             Project: Lucene - Java
>          Issue Type: Test
>          Components: modules/facet
>            Reporter: Robert Muir
>             Fix For: 3.5, 4.0
>
>         Attachments: LUCENE-3269.patch, LUCENE-3269.patch, LUCENE-3269.patch, 
> LUCENE-3269.patch
>
>
> speed up the top-k sampling tests (but make sure they are thorough on nightly 
> etc still)
> usually we would do this with use of atLeast(), but these tests are somewhat 
> tricky,
> so maybe a different approach is needed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to